neo_doxygen: Remove an outdated comment.
[nit.git] / contrib / neo_doxygen / src / tests / neo_doxygen_file_compound.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 import tests
16 import model::module_compound
17
18 var graph = new ProjectGraph("foo")
19 var file = new FileCompound(graph)
20 var file_2 = new FileCompound(graph)
21 var bar_class = new ClassCompound(graph)
22 var baz_class = new ClassCompound(graph)
23 var a_ns = new Namespace(graph)
24 var b_ns = new Namespace(graph)
25 var c_ns = new Namespace(graph)
26 var d_ns = new Namespace(graph)
27 var buffer = new RopeBuffer
28
29 file.full_name = "Bar.java"
30 file.model_id = "_Bar_8java"
31 file.declare_class("classa_b_bar", "a::b::Bar", "package")
32 file.declare_class("classbaz", "Baz", "")
33 file.declare_namespace("", "a::b")
34 file.put_in_graph
35
36 file_2.full_name = "Bar.java"
37 file_2.model_id = "_Bar_8java_2"
38 file_2.declare_namespace("namespacec", "c")
39 file_2.declare_namespace("", "d")
40 file_2.put_in_graph
41
42 bar_class.model_id = "classa_b_bar"
43 bar_class.full_name = "a::b::Bar"
44 bar_class.put_in_graph
45
46 baz_class.model_id = "classbaz"
47 baz_class.full_name = "Baz"
48 baz_class.put_in_graph
49
50 a_ns.full_name = "a"
51 a_ns.declare_namespace("", "a::b")
52 a_ns.put_in_graph
53
54 b_ns.full_name = "a::b"
55 b_ns.declare_class("classa_b_bar", "", "")
56 b_ns.put_in_graph
57
58 c_ns.model_id = "namespacec"
59 c_ns.full_name = "c"
60 c_ns.put_in_graph
61
62 d_ns.model_id = "namespaced"
63 d_ns.full_name = "d"
64 d_ns.put_in_graph
65
66 print "---===WITHOUT GLOBALS===---"
67 graph.put_edges
68 graph.debug buffer
69 print buffer
70
71 print "---===WITH GLOBALS===---"
72 buffer.clear
73 graph.add_global_modules
74 graph.put_edges
75 graph.debug buffer
76 print buffer