From e0c8285f075e394f5370300451e7767b9d94a761 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 17 Jun 2019 22:57:21 +0900 Subject: [PATCH] Extend nested struct test to cover struct copy Fails :P --- tools/qfcc/test/structstruct.r | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/qfcc/test/structstruct.r b/tools/qfcc/test/structstruct.r index 5ae1e06e5..c8ef25fad 100644 --- a/tools/qfcc/test/structstruct.r +++ b/tools/qfcc/test/structstruct.r @@ -16,6 +16,8 @@ typedef struct Rect { } Rect; Rect rect = {{1, 2}, {3, 4}}; +Point origin = {5, 6}; +Size size = {7, 8}; int test_struct_1(Rect rect) @@ -49,5 +51,11 @@ main() ret |= test_struct_2(rect) != 2; ret |= test_struct_3(rect) != 3; ret |= test_struct_4(rect) != 4; + rect.origin = origin; + rect.size = size; + ret |= test_struct_1(rect) != 5; + ret |= test_struct_2(rect) != 6; + ret |= test_struct_3(rect) != 7; + ret |= test_struct_4(rect) != 8; return ret; }