1 | echo(false);
|
---|
2 | s1 := "package A
|
---|
3 | package P1
|
---|
4 | model M
|
---|
5 | Real x;
|
---|
6 | end M;
|
---|
7 | end P1;
|
---|
8 | end A;";
|
---|
9 | loadString(s1, "A.mo");
|
---|
10 | getErrorString();
|
---|
11 | addComponent(z, Real, A.P1.M);
|
---|
12 | getErrorString();
|
---|
13 | answer := "package A
|
---|
14 | package P1
|
---|
15 | model M
|
---|
16 | Real x;
|
---|
17 | Real z;
|
---|
18 | end M;
|
---|
19 | end P1;
|
---|
20 | end A;";
|
---|
21 | s2 := listFile(A);
|
---|
22 | print(s2);
|
---|
23 | res := diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain);
|
---|
24 | print("\n"+res);
|
---|
25 | if answer<>res then
|
---|
26 | print("\nFailed:\nGot:\n"+diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.plain)+"\nExpected:\n"+diffModelicaFileListings(s1, s2, OpenModelica.Scripting.DiffFormat.color));
|
---|
27 | end if;
|
---|