Add test for #220
This commit is contained in:
parent
64563ff994
commit
97586a750e
@ -10,6 +10,12 @@ function(add_compiler_test test_name options)
|
||||
ENVIRONMENT PATH=$<TARGET_FILE_DIR:pawnc>)
|
||||
endfunction()
|
||||
|
||||
#
|
||||
# Compile tests
|
||||
#
|
||||
# These tests compare compile output against a regular expression and fail if the output
|
||||
# doesn't match the expected pattern.
|
||||
#
|
||||
add_compiler_test(gh_217 ${CMAKE_CURRENT_SOURCE_DIR}/gh_217.pwn)
|
||||
set_tests_properties(gh_217 PROPERTIES PASS_REGULAR_EXPRESSION
|
||||
".*: warning 237: user warning: this is warning 1[\r\n]+\
|
||||
@ -18,3 +24,13 @@ set_tests_properties(gh_217 PROPERTIES PASS_REGULAR_EXPRESSION
|
||||
.*: warning 237: user warning: this is warning 4[\r\n]+\
|
||||
.*: warning 234: function is deprecated \\(symbol \"f\"\\) don't use this functionplease[\r\n]+\
|
||||
.*: warning 234: function is deprecated \\(symbol \"f\"\\) don't use this functionplease")
|
||||
|
||||
#
|
||||
# Crashers
|
||||
#
|
||||
# These tests simply check that the compiler doesn't crash.
|
||||
#
|
||||
# TODO: Probably need to support tests that exist with a non-zero code but don't crash?
|
||||
# Right now this will cause a failure.
|
||||
#
|
||||
add_compiler_test(md_array_crash_gh_220 ${CMAKE_CURRENT_SOURCE_DIR}/md_array_crash_gh_220.pwn)
|
||||
|
6
source/compiler/tests/md_array_crash_gh_220.pwn
Normal file
6
source/compiler/tests/md_array_crash_gh_220.pwn
Normal file
@ -0,0 +1,6 @@
|
||||
new a[1000][500] = { { 0, 1, ... }, ... };
|
||||
new b[2000][500] = { { 0, -1, ... }, ... };
|
||||
|
||||
main() {
|
||||
a[0][0] = b[0][0];
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user