c654bd4f5dec6f93a5bc6f81010c687e38bb88a4
[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 c_ns = new Namespace(graph)
23 var buffer = new RopeBuffer
24
25 file.full_name = "Bar.java"
26 file.model_id = "_Bar_8java"
27 file.declare_class("classa_b_bar", "a::b::Bar")
28 file.declare_namespace("", "a::b")
29 file.put_in_graph
30
31 file_2.full_name = "Bar.java"
32 file_2.model_id = "_Bar_8java_2"
33 file_2.declare_namespace("namespacec", "c")
34 file_2.declare_namespace("", "d")
35 file_2.put_in_graph
36
37 bar_class.model_id = "classa_b_bar"
38 bar_class.full_name = "a::b::Bar"
39 bar_class.put_in_graph
40
41 c_ns.model_id = "namespacec"
42 c_ns.full_name = "c"
43 c_ns.put_in_graph
44
45 graph.put_edges
46 graph.debug buffer
47 print buffer