-
Notifications
You must be signed in to change notification settings - Fork 298
/
Ticket6307.mos
59 lines (50 loc) · 2.33 KB
/
Ticket6307.mos
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// name: Ticket6307.mos
// keywords:
// status: correct
//
// Tests if -d=nfAPI will give the correct response for getComponentAnnotations
//
setCommandLineOptions("-d=nfAPI"); getErrorString();
loadString("
model Ticket6307
model M
parameter Real x = 1;
end M;
replaceable model M1 = M(x=2) annotation(choicesAllMatching=true);
Real a annotation(choicesAllMatching=true);
Real b annotation(choicesAllMatching=true);
end Ticket6307;
"); getErrorString();
getComponents(Ticket6307); getErrorString();
getComponentAnnotations(Ticket6307); getErrorString();
getElements(Ticket6307); getErrorString();
getElementAnnotations(Ticket6307); getErrorString();
setCommandLineOptions("-d=nfAPI"); getErrorString();
getComponents(Ticket6307); getErrorString();
getComponentAnnotations(Ticket6307); getErrorString();
getElements(Ticket6307); getErrorString();
getElementAnnotations(Ticket6307); getErrorString();
// Result:
// true
// ""
// true
// ""
// {{Real,a,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Real,b,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}}}
// ""
// {{choicesAllMatching=true},{choicesAllMatching=true}}
// ""
// {{"cl", "model", Ticket6307.M, M1, "", "public", false, false, false, true, "unspecified", "none", "unspecified", $Any, {}},{"co", "-", Real, a, "", "public", false, false, false, false, "unspecified", "none", "unspecified", $Any, {}},{"co", "-", Real, b, "", "public", false, false, false, false, "unspecified", "none", "unspecified", $Any, {}}}
// ""
// {{choicesAllMatching=true},{choicesAllMatching=true},{choicesAllMatching=true}}
// ""
// true
// ""
// {{Real,a,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}},{Real,b,"", "public", false, false, false, false, "unspecified", "none", "unspecified",{}}}
// ""
// {{choicesAllMatching=true},{choicesAllMatching=true}}
// ""
// {{"cl", "model", Ticket6307.M, M1, "", "public", false, false, false, true, "unspecified", "none", "unspecified", $Any, {}},{"co", "-", Real, a, "", "public", false, false, false, false, "unspecified", "none", "unspecified", $Any, {}},{"co", "-", Real, b, "", "public", false, false, false, false, "unspecified", "none", "unspecified", $Any, {}}}
// ""
// {{choicesAllMatching=true},{choicesAllMatching=true},{choicesAllMatching=true}}
// ""
// endResult