Skip to content

Commit 1c4af88

Browse files
committed
Add unit test for array_reverse
1 parent 0f837e8 commit 1c4af88

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,4 +411,11 @@ public void testStringSlice() throws Exception {
411411
verify(fakePlayer).sendMessage("{1, 16, 64}");
412412
}
413413

414+
@Test public void testArrayReverse() throws Exception {
415+
Run("@array = array(1, 2, 3, 4);\n"
416+
+ "array_reverse(@array);\n"
417+
+ "msg(@array);\n", fakePlayer);
418+
verify(fakePlayer).sendMessage("{4, 3, 2, 1}");
419+
}
420+
414421
}

0 commit comments

Comments
 (0)