tests: updates for user-declated annotations
authorJean Privat <jean@pryen.org>
Thu, 31 Jul 2014 05:59:22 +0000 (01:59 -0400)
committerJean Privat <jean@pryen.org>
Mon, 4 Aug 2014 16:20:10 +0000 (12:20 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/base_user_annotation.nit [new file with mode: 0644]
tests/base_user_annotation2.nit [new file with mode: 0644]
tests/base_user_annotation3.nit [new file with mode: 0644]
tests/sav/base_user_annotation3.res [new file with mode: 0644]
tests/sav/syntax_annotations.res [new file with mode: 0644]
tests/sav/syntax_annotations2.res [new file with mode: 0644]
tests/sav/syntax_annotations3.res [new file with mode: 0644]

diff --git a/tests/base_user_annotation.nit b/tests/base_user_annotation.nit
new file mode 100644 (file)
index 0000000..96fa0af
--- /dev/null
@@ -0,0 +1,20 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+module base_user_annotation is
+       foo
+       new_annotation foo
+end
+
+import end
diff --git a/tests/base_user_annotation2.nit b/tests/base_user_annotation2.nit
new file mode 100644 (file)
index 0000000..cd691d3
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+private import base_user_annotation is foo
diff --git a/tests/base_user_annotation3.nit b/tests/base_user_annotation3.nit
new file mode 100644 (file)
index 0000000..79aae40
--- /dev/null
@@ -0,0 +1,15 @@
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import base_user_annotation2 is foo
diff --git a/tests/sav/base_user_annotation3.res b/tests/sav/base_user_annotation3.res
new file mode 100644 (file)
index 0000000..227f329
--- /dev/null
@@ -0,0 +1 @@
+base_user_annotation3.nit:15,33--35: Warning: unknown annotation `foo`
diff --git a/tests/sav/syntax_annotations.res b/tests/sav/syntax_annotations.res
new file mode 100644 (file)
index 0000000..b38fe92
--- /dev/null
@@ -0,0 +1 @@
+syntax_annotations.nit:15,10--12: Warning: unknown annotation `foo`
diff --git a/tests/sav/syntax_annotations2.res b/tests/sav/syntax_annotations2.res
new file mode 100644 (file)
index 0000000..a1d6fe7
--- /dev/null
@@ -0,0 +1,3 @@
+syntax_annotations2.nit:16,2--6: Warning: unknown annotation `annot`
+syntax_annotations2.nit:17,2--7: Warning: unknown annotation `annot2`
+syntax_annotations2.nit:38,15--17: Warning: unknown annotation `foo`
diff --git a/tests/sav/syntax_annotations3.res b/tests/sav/syntax_annotations3.res
new file mode 100644 (file)
index 0000000..957e98d
--- /dev/null
@@ -0,0 +1,14 @@
+syntax_annotations3.nit:16,2--20: Warning: unknown annotation `invariant`
+syntax_annotations3.nit:19,3--12: Warning: unknown annotation `pre`
+syntax_annotations3.nit:20,3--22: Warning: unknown annotation `post`
+syntax_annotations3.nit:21,3--19: Warning: unknown annotation `test`
+syntax_annotations3.nit:28,3--7: Warning: unknown annotation `inter`
+syntax_annotations3.nit:33,16--18: Warning: unknown annotation `u32`
+syntax_annotations3.nit:34,19--36: Warning: unknown annotation `after`
+syntax_annotations3.nit:34,12--36: Warning: unknown annotation `daemon`
+syntax_annotations3.nit:34,3--37: Warning: unknown annotation `ondebug`
+syntax_annotations3.nit:35,3--7: Warning: unknown annotation `final`
+syntax_annotations3.nit:38,28--35: Warning: unknown annotation `readable`
+syntax_annotations3.nit:38,38--45: Warning: unknown annotation `initable`
+syntax_annotations3.nit:38,48--56: Warning: unknown annotation `fast_init`
+syntax_annotations3.nit:42,20--28: Warning: unknown annotation `unchecked`