From 940335d1ce62327fb44f22ddcd29062c79def5a9 Mon Sep 17 00:00:00 2001 From: Stanislav Gromov Date: Thu, 30 Sep 2021 23:27:56 +0700 Subject: [PATCH] Add tests --- source/compiler/tests/gh_668.meta | 7 +++++++ source/compiler/tests/gh_668.pwn | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 source/compiler/tests/gh_668.meta create mode 100644 source/compiler/tests/gh_668.pwn diff --git a/source/compiler/tests/gh_668.meta b/source/compiler/tests/gh_668.meta new file mode 100644 index 0000000..6fb1bd8 --- /dev/null +++ b/source/compiler/tests/gh_668.meta @@ -0,0 +1,7 @@ +{ + 'test_type': 'output_check', + 'errors': """ +gh_668.pwn(1) : error 009: invalid array size (negative, zero or out of bounds) +gh_668.pwn(5) : error 009: invalid array size (negative, zero or out of bounds) + """ +} diff --git a/source/compiler/tests/gh_668.pwn b/source/compiler/tests/gh_668.pwn new file mode 100644 index 0000000..aff294d --- /dev/null +++ b/source/compiler/tests/gh_668.pwn @@ -0,0 +1,7 @@ +new global_array[0] = { 0 }; // error 009 + +main() +{ + new local_array[0] = { 0 }; // error 009 + return global_array[0] + local_array[0]; +}