Skip to content

Commit

Permalink
Merge pull request #40130 from aaronfranke/mingw-sucks
Browse files Browse the repository at this point in the history
Fix string test code for MinGW
  • Loading branch information
akien-mga committed Jul 5, 2020
2 parents 17f5ebc + 5c21732 commit 0287508
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion main/tests/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,11 @@ bool test_22() {
static const int num[4] = { 1237461283, -22, 0, -1123412 };

for (int i = 0; i < 4; i++) {
#ifdef __MINGW32__ // MinGW can't handle normal format specifiers for some reason. So we need special code just for MinGW.
OS::get_singleton()->print("\tString: \"%s\" as Int is %I64i\n", nums[i], (long long)(String(nums[i]).to_int()));
#else
OS::get_singleton()->print("\tString: \"%s\" as Int is %lli\n", nums[i], (long long)(String(nums[i]).to_int()));

#endif
if (String(nums[i]).to_int() != num[i]) {
return false;
}
Expand Down

0 comments on commit 0287508

Please sign in to comment.