Merge: GitHub API: handles comments
[nit.git] / contrib / neo_doxygen / src / tests / neo_doxygen_member_resolve_introducer.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 model::member
16
17 # Copied from the documentation of `Member::resolve_introducer`.
18
19 var g = new ProjectGraph("foo")
20 var m1 = new Attribute(g)
21 var m2 = new Attribute(g)
22 var m3 = new Attribute(g)
23
24 m1.model_id = "1"
25 m1.put_in_graph
26 m2.reimplement("1")
27 m2.put_in_graph
28 assert m1.resolve_introducer == m1.introducer
29 assert m2.resolve_introducer == m1.introducer
30
31 m3.model_id = "3"
32 m3.reimplement("3")
33 m3.put_in_graph
34 assert m3.resolve_introducer == null