Skip to content

Commit a9b3800

Browse files
committed
Compile Tests only for DIAG_DEVELOPER
1 parent a126aa0 commit a9b3800

12 files changed

Lines changed: 73 additions & 55 deletions

scripts/3_Game/sUDE/util/testing/sTest.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
class STest : Managed {
24

35
/**
@@ -24,6 +26,9 @@ class STest : Managed {
2426
array<typename> tests = {
2527
//TestUnit_STest,
2628
TestUnit_SMath,
29+
TestUnit_SFlagOperator,
30+
TestUnit_SColor,
31+
TestUnit_SFileHelper,
2732
TestUnit_SConstraints,
2833
TestUnit_SUserConfigOption,
2934
TestUnit_SUserConfig,
@@ -151,3 +156,6 @@ class STest : Managed {
151156

152157
}
153158

159+
160+
161+
#endif

scripts/3_Game/sUDE/util/testing/units/STestCase.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
enum eSTestCaseStatus {
24
PASSED,
35
FAILED,
@@ -69,3 +71,4 @@ class STestCase : Managed {
6971

7072
}
7173

74+
#endif

scripts/3_Game/sUDE/util/testing/units/STestUnit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
typedef Param2<Class, string> STestBeforeCallback;
24
typedef Param2<Class, string> STestBeforeClassCallback;
35
typedef Param2<Class, string> STestAfterCallback;
@@ -294,4 +296,6 @@ class STestUnit : Managed {
294296
m_currentTestCaseTested.setMessage(message);
295297

296298
}
297-
}
299+
}
300+
301+
#endif

scripts/3_Game/sUDE/util/testing/units/TestUnit_ObservableArray.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
class TestUnit_SObservableArray : STestUnit {
24

35

@@ -147,4 +149,6 @@ class TestUnit_SObservableArray : STestUnit {
147149
pass("2", ""+arguments.param1);
148150
}
149151

150-
}
152+
}
153+
154+
#endif
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifdef DIAG_DEVELOPER
2+
3+
class TestUnit_SColor : STestUnit {
4+
5+
}
6+
7+
8+
#endif

scripts/3_Game/sUDE/util/testing/units/TestUnit_SConstraints.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
class TestUnit_SConstraints : STestUnit {
24

35
override void init() {
@@ -151,4 +153,6 @@ class TestUnit_SConstraints : STestUnit {
151153
assertEqual(expected, constraint.constrained(toCostrain));
152154
}
153155

154-
}
156+
}
157+
158+
#endif
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifdef DIAG_DEVELOPER
2+
3+
class TestUnit_SFileHelper : STestUnit {
4+
5+
}
6+
7+
8+
#endif
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#ifdef DIAG_DEVELOPER
2+
3+
class TestUnit_SFlagOperator : STestUnit {
4+
5+
}
6+
7+
8+
#endif

scripts/3_Game/sUDE/util/testing/units/TestUnit_SMath.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
class TestUnit_SMath : STestUnit {
24

35
override void init() {
@@ -130,4 +132,6 @@ class TestUnit_SMath : STestUnit {
130132
void shouldSkip() {
131133
// do nothing
132134
}
133-
}
135+
}
136+
137+
#endif

scripts/3_Game/sUDE/util/testing/units/TestUnit_STest.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#ifdef DIAG_DEVELOPER
2+
13
//lol :)
24
class TestUnit_STest : STestUnit {
35

@@ -84,4 +86,7 @@ class TestUnit_STest : STestUnit {
8486
void testAssertNotNull() {
8587
assertNotNull(new SColor());
8688
}
87-
}
89+
}
90+
91+
92+
#endif

0 commit comments

Comments
 (0)