@@ -37,11 +37,12 @@ class TestPlatform : public TestFixture {
3737 TEST_CASE (valid_config_win32w);
3838 TEST_CASE (valid_config_unix32);
3939 TEST_CASE (valid_config_win64);
40+ // TODO: test native and unspecified
4041 TEST_CASE (valid_config_file_1);
4142 TEST_CASE (valid_config_file_2);
42- TEST_CASE (valid_config_file_3);
4343 TEST_CASE (valid_config_file_4);
4444 TEST_CASE (invalid_config_file_1);
45+ TEST_CASE (invalid_config_file_2);
4546 TEST_CASE (empty_elements);
4647 TEST_CASE (default_platform);
4748 TEST_CASE (limitsDefines);
@@ -210,6 +211,7 @@ class TestPlatform : public TestFixture {
210211 // Similar to the avr8 platform file.
211212 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
212213 " <platform>\n "
214+ " <windows>false</windows>\n "
213215 " <char_bit>8</char_bit>\n "
214216 " <default-sign>unsigned</default-sign>\n "
215217 " <sizeof>\n "
@@ -254,6 +256,7 @@ class TestPlatform : public TestFixture {
254256 // char_bit > 8.
255257 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
256258 " <platform>\n "
259+ " <windows>true</windows>\n "
257260 " <char_bit>20</char_bit>\n "
258261 " <default-sign>signed</default-sign>\n "
259262 " <sizeof>\n "
@@ -273,7 +276,7 @@ class TestPlatform : public TestFixture {
273276 PlatformTest platform;
274277 ASSERT (readPlatform (platform, xmldata));
275278 ASSERT_EQUALS (Platform::Type::File, platform.type );
276- ASSERT (! platform.isWindows ());
279+ ASSERT (platform.isWindows ());
277280 ASSERT_EQUALS (20 , platform.char_bit );
278281 ASSERT_EQUALS (' s' , platform.defaultSign );
279282 ASSERT_EQUALS (1 , platform.sizeof_bool );
@@ -293,11 +296,12 @@ class TestPlatform : public TestFixture {
293296 ASSERT_EQUALS (100 , platform.long_long_bit );
294297 }
295298
296- void valid_config_file_3 () const {
297- // Valid platform configuration without any usable information.
299+ void invalid_config_file_2 () const {
300+ // Invalid platform configuration without any usable information.
298301 // Similar like an empty file.
299302 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
300303 " <platform>\n "
304+ " <windows1>true</windows1>\n "
301305 " <char_bit1>8</char_bit1>\n "
302306 " <default-sign1>unsigned</default-sign1>\n "
303307 " <sizeof1>\n "
@@ -324,6 +328,7 @@ class TestPlatform : public TestFixture {
324328 // set to 0.
325329 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
326330 " <platform>\n "
331+ " <windows>true</windows>\n "
327332 " <char_bit>0</char_bit>\n "
328333 " <default-sign>z</default-sign>\n "
329334 " <sizeof>\n "
@@ -343,7 +348,7 @@ class TestPlatform : public TestFixture {
343348 PlatformTest platform;
344349 ASSERT (readPlatform (platform, xmldata));
345350 ASSERT_EQUALS (Platform::Type::File, platform.type );
346- ASSERT (! platform.isWindows ());
351+ ASSERT (platform.isWindows ());
347352 ASSERT_EQUALS (0 , platform.char_bit );
348353 ASSERT_EQUALS (' z' , platform.defaultSign );
349354 ASSERT_EQUALS (0 , platform.sizeof_bool );
@@ -367,6 +372,7 @@ class TestPlatform : public TestFixture {
367372 // Invalid XML file: mismatching elements "boolt" vs "bool".
368373 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
369374 " <platform>\n "
375+ " <windows>false</windows>\n "
370376 " <char_bit>8</char_bit>\n "
371377 " <default-sign>unsigned</default-sign>\n "
372378 " <sizeof>\n "
@@ -392,6 +398,7 @@ class TestPlatform : public TestFixture {
392398 // Similar like an empty file.
393399 constexpr char xmldata[] = " <?xml version=\" 1.0\" ?>\n "
394400 " <platform>\n "
401+ " <windows></windows>\n "
395402 " <char_bit></char_bit>\n "
396403 " <default-sign></default-sign>\n "
397404 " <sizeof>\n "
0 commit comments