| 1 |
// Copyright (c) Microsoft. All rights reserved. |
| 2 |
// Licensed under the MIT license. See LICENSE file in the project root for full license information. |
| 3 |
|
| 4 |
#include "test_helper.h" |
| 5 |
|
| 6 |
#include "azure_macro_utils/macro_utils.h" |
| 7 |
|
| 8 |
/*this is bringing in the test structs*/ |
| 9 |
#include "define_struct_test.h" |
| 10 |
|
| 11 |
int run_define_struct_tests(void) |
| 12 |
{ |
| 13 |
int result = 0; |
| 14 |
|
| 15 |
/* this test only makes sure that the structs can be generated */ |
| 16 |
/* if it builds, it succeeds! */ |
| 17 |
|
| 18 |
TEST_STRUCT_WITH_1_FIELD test_struct_with_1_field; |
| 19 |
test_struct_with_1_field.a = 42; |
| 20 |
|
| 21 |
TEST_STRUCT_WITH_2_FIELDS test_struct_with_2_fields; |
| 22 |
test_struct_with_2_fields.a = 42; |
| 23 |
test_struct_with_2_fields.x = NULL; |
| 24 |
|
| 25 |
TEST_NESTED_STRUCT test_nested_struct; |
| 26 |
test_nested_struct.a = 43; |
| 27 |
test_nested_struct.x = "a"; |
| 28 |
test_nested_struct.z.a = 42; |
| 29 |
test_nested_struct.z.x = NULL; |
| 30 |
|
| 31 |
return result; |
| 32 |
} |