Skip to content

Commit abb805f

Browse files
committed
Added unit test for array_scontains.
For testing.
1 parent 518ba47 commit abb805f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/test/java/com/laytonsmith/core/functions/ArrayHandlingTest.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,14 @@ public void testArrayContains() throws CancelCommandException {
118118
assertCEquals(C.onstruct(true), a.exec(Target.UNKNOWN, env, commonArray, C.onstruct(1)));
119119
assertCEquals(C.onstruct(false), a.exec(Target.UNKNOWN, env, commonArray, C.onstruct(55)));
120120
}
121+
122+
@Test(timeout = 10000)
123+
public void testArraySContains() throws CancelCommandException {
124+
ArrayHandling.array_scontains a = new ArrayHandling.array_scontains();
125+
assertCEquals(C.onstruct(true), a.exec(Target.UNKNOWN, env, commonArray, C.onstruct(1)));
126+
assertCEquals(C.onstruct(false), a.exec(Target.UNKNOWN, env, commonArray, C.onstruct(55)));
127+
assertCEquals(C.onstruct(false), a.exec(Target.UNKNOWN, env, commonArray, C.onstruct("1")));
128+
}
121129

122130
@Test(expected = Exception.class, timeout = 10000)
123131
public void testArrayContainsEx() throws CancelCommandException {

0 commit comments

Comments
 (0)