Debian Codegraph @

src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/testtools/ctest/tests/ctest_ut/testfunctioninitializetests.c

raw
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 "ctest.h"
5
6 static int x = 0;
7 static int y = 0;
8
9 CTEST_BEGIN_TEST_SUITE(TestFunctionInitializeTests)
10
11 CTEST_FUNCTION_INITIALIZE()
12 {
13 x++;
14 }
15
16 CTEST_FUNCTION_CLEANUP()
17 {
18 }
19
20 CTEST_FUNCTION(Test1)
21 {
22 y++;
23 CTEST_ASSERT_ARE_EQUAL(int, y, x);
24 }
25
26 CTEST_FUNCTION(Test2)
27 {
28 y++;
29 CTEST_ASSERT_ARE_EQUAL(int, y, x);
30 }
31
32 CTEST_END_TEST_SUITE(TestFunctionInitializeTests)