Created
April 18, 2017 05:39
-
-
Save DouglasSherk/755b2caa92a23b272335fc0a4110269d to your computer and use it in GitHub Desktop.
A test case for the ArrayX API.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
testLotsOfData() { | |
new array = array_create() | |
for (int i = 0; i < 1000000; i++) { | |
array_set_int(array, 0, 1) | |
/** | |
* What? This was segfaulting after some large i, usually ~: | |
* 100000 < i < 500000 | |
*/ | |
array_delete(array, 0) | |
} | |
if (!array_isempty(array)) { | |
console_print(0, "[TEST] [ArrayX] Test case 'testLotsOfData' failed: !array_isempty()") | |
return false | |
} | |
return true | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment