From 87b535292e699cf9cfa4ade37acb26625d26961a Mon Sep 17 00:00:00 2001 From: Odeinjul Date: Sun, 17 Dec 2023 23:36:28 +0800 Subject: [PATCH] Add tests --- Student/task3/test.py | 1 + Student/task3/test/31_func_array.sy | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 Student/task3/test/31_func_array.sy diff --git a/Student/task3/test.py b/Student/task3/test.py index 3f0404d..08457e8 100644 --- a/Student/task3/test.py +++ b/Student/task3/test.py @@ -77,6 +77,7 @@ if __name__ == "__main__": # you can only modify this to add your testcase TEST_DIRS = [ './test/', + './function_test2021/', ] # you can only modify this to add your testcase diff --git a/Student/task3/test/31_func_array.sy b/Student/task3/test/31_func_array.sy new file mode 100644 index 0000000..d56cc4c --- /dev/null +++ b/Student/task3/test/31_func_array.sy @@ -0,0 +1,7 @@ +int main(){ + int a[5][2] = {1,{2,3},{4},{5,6,7}}; + int b[5][2] = {{1,0},{2,3},{4,0},{5,6},{7,0}}; + int i = a[3][1]; + int j = b[3][1]; + return i - j; +}