Skip to content

Commit 1faf46e

Browse files
committed
Fix deficiency in the race test
The test for construction of local static objects doesn't check to see if the object returned has been fully initialized. Because of this, an error with ARMCC was not detected. This patch adds an assert to the race_test to ensure that the object has been properly initialized.
1 parent 2e1c2a1 commit 1faf46e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

TESTS/mbed_drivers/race_test/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ static SingletonPtr<TestClass> test_class;
5858
static void main_func_race()
5959
{
6060
get_test_class();
61+
TEST_ASSERT_EQUAL_UINT32(1, instance_count);
6162
}
6263

6364
static void main_class_race()
6465
{
6566
test_class->do_something();
67+
TEST_ASSERT_EQUAL_UINT32(1, instance_count);
6668
}
6769

6870
void test_case_func_race()

0 commit comments

Comments
 (0)