File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ import System.IO
4
4
import System.Text
5
5
import Microsoft.VisualStudio.TestTools.UnitTesting
6
6
import System.Diagnostics
7
+ import CodeGen.RepositoryAPI
7
8
8
9
namespace UnitTests
9
10
10
11
{TestClass}
11
12
public class EnvironmentConfig
12
13
14
+ public static Repository, @Repository
15
+
13
16
{AssemblyInitialize}
14
17
public static method AssemblyInitialize, void
15
18
context, @TestContext
@@ -18,6 +21,7 @@ namespace UnitTests
18
21
xcall setlog("RPSMFIL","..\..\SampleRepository\rpsmain.ism",sts)
19
22
xcall setlog("RPSTFIL","..\..\SampleRepository\rpstext.ism",sts)
20
23
xcall setlog("CODEGEN_EXE",".",sts)
24
+ Repository = new Repository("..\..\SampleRepository\rpsmain.ism","..\..\SampleRepository\rpstext.ism")
21
25
endmethod
22
26
23
27
endclass
Original file line number Diff line number Diff line change @@ -18,23 +18,23 @@ namespace UnitTests
18
18
19
19
public method Simulate
20
20
required in structureName, String
21
- endparams
22
21
proc
23
-
24
22
Environment.SetEnvironmentVariable("CODEGEN_EXE",Path.GetDirectoryName(System.Reflection.Assembly.GetAssembly(^typeof(CodeGenerator)).Location))
25
23
26
- str = new RpsStructure(context.Repository,structureName)
27
-
28
24
taskset = new CodeGenTaskSet()
29
25
task = new CodeGenTask()
30
26
task.Structures.Add(structureName)
31
27
taskset.Tasks.Add(task)
32
28
33
- context = new CodeGenContext(taskset)
29
+ context = new CodeGenContext(taskset)
30
+ context.Repository = EnvironmentConfig.Repository
34
31
context.CurrentTask = task
35
32
context.StructureFileIndex = new int[1]
36
33
context.StructureFileIndex[0] = 0
37
34
context.CurrentFileIndex = 0
35
+
36
+ str = new RpsStructure(context.Repository,structureName)
37
+
38
38
context.SetCurrentStructure(str)
39
39
40
40
context.UserTokens = new List<UserToken>()
You can’t perform that action at this time.
0 commit comments