-
Notifications
You must be signed in to change notification settings - Fork 298
/
TestLoadModel.mos
114 lines (102 loc) · 2.8 KB
/
TestLoadModel.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
// name: TestLoadModel
// status: correct
// Test loading of correct version of a library
// depends: TestLibrary
setModelicaPath("TestLibrary/");
"3.2";
loadModel(Modelica,{"3.2"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"3.2.1";
loadModel(Modelica,{"3.2.1"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"4.1, 3.2";
loadModel(Modelica,{"4.1","3.2"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"4.1, 3.1, 3.2";
loadModel(Modelica,{"4.1","3.1","3.2"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"default, 3.2";
loadModel(Modelica,{"default","3.2"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"3.3 beta1, default, 3.2";
loadModel(Modelica,{"3.3 beta1","default","3.2"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"3.4 beta1";
loadModel(Modelica,{"3.4 beta1"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"3.4";
loadModel(Modelica,{"3.4"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"3.5 beta1";
loadModel(Modelica,{"3.5 beta1"});
getErrorString();
"CustomSort";
loadModel(Modelica,{"CustomSort"});
getErrorString();getNamedAnnotation(Modelica,version);clear() and setCommandLineOptions("--std=latest");
"XYZ";
loadModel(ABC,{"XYZ"});
getErrorString();getNamedAnnotation(ABC,version);clear() and setCommandLineOptions("--std=latest");
"Invalid";
loadModel(Invalid);getErrorString();
// Result:
// true
// "3.2"
// true
// ""
// {"3.2"}
// true
// "3.2.1"
// true
// ""
// {"3.2.1"}
// true
// "4.1, 3.2"
// true
// ""
// {"3.2"}
// true
// "4.1, 3.1, 3.2"
// true
// ""
// {"3.1"}
// true
// "default, 3.2"
// true
// ""
// {"3.2.1"}
// true
// "3.3 beta1, default, 3.2"
// true
// ""
// {"3.3 beta1"}
// true
// "3.4 beta1"
// true
// ""
// {"3.4 beta1"}
// true
// "3.4"
// true
// ""
// {"3.4 beta1"}
// true
// "3.5 beta1"
// true
// "[TestLibrary//Modelica 3.5 beta1/package.order:0:0-0:0:readonly] Warning: Found duplicate names in package.order file: A.
// "
// "CustomSort"
// true
// ""
// {"CustomSort"}
// true
// "XYZ"
// true
// ""
// {"XYZ"}
// true
// "Invalid"
// false
// "[flattening/modelica/mosfiles/TestLibrary/Invalid/package.mo:1:1-2:12:writable] Error: The same class is defined in multiple files: flattening/modelica/mosfiles/TestLibrary/Invalid/Duplicate.mo, flattening/modelica/mosfiles/TestLibrary/Invalid/Duplicate/package.mo.
// Error: Failed to load package Invalid (default) using MODELICAPATH TestLibrary/.
// "
// endResult