neo_doxygen: Manage top-level namespaces in `doxml`.
[nit.git] / contrib / neo_doxygen / src / tests / neo_doxygen_file_compound.nit
index 15a7531..f8af04f 100644 (file)
@@ -25,9 +25,14 @@ var b_ns = new Namespace(graph)
 var c_ns = new Namespace(graph)
 var d_ns = new Namespace(graph)
 var buffer = new RopeBuffer
+var root_ns = graph.by_id[""].as(Namespace)
+var location: Location
 
 file.full_name = "Bar.java"
 file.model_id = "_Bar_8java"
+location = new Location
+location.path = "a/b/Bar.java"
+file.location = location
 file.declare_class("classa_b_bar", "a::b::Bar", "package")
 file.declare_class("classbaz", "Baz", "")
 file.declare_namespace("", "a::b")
@@ -35,18 +40,35 @@ file.put_in_graph
 
 file_2.full_name = "Bar.java"
 file_2.model_id = "_Bar_8java_2"
+location = new Location
+location.path = "Bar.java"
+file_2.location = location
 file_2.declare_namespace("namespacec", "c")
 file_2.declare_namespace("", "d")
 file_2.put_in_graph
 
 bar_class.model_id = "classa_b_bar"
 bar_class.full_name = "a::b::Bar"
+location = new Location
+location.path = "a/b/Bar.class"
+location.line_start = 5
+location.column_start = 1
+location.line_end = 100
+location.column_end = 10
+bar_class.location = location
 bar_class.put_in_graph
 
 baz_class.model_id = "classbaz"
 baz_class.full_name = "Baz"
+location = new Location
+location.path = "Baz.jar"
+baz_class.location = location
 baz_class.put_in_graph
 
+root_ns.declare_namespace("", "a")
+root_ns.declare_namespace("namespacec", "c")
+root_ns.declare_namespace("", "d")
+
 a_ns.full_name = "a"
 a_ns.declare_namespace("", "a::b")
 a_ns.put_in_graph