File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -439,6 +439,14 @@ TEST(Value, Int) {
439
439
EXPECT_EQ (5678 , z.Get <int >());
440
440
EXPECT_EQ (5679 , z.Set (5679 ).Get <int >());
441
441
EXPECT_EQ (5680 , z.Set <int >(5680 ).Get <int >());
442
+
443
+ #ifdef _MSC_VER
444
+ // long as int on MSC platforms
445
+ RAPIDJSON_STATIC_ASSERT (sizeof (long ) == sizeof (int ));
446
+ z.SetInt (1234 );
447
+ EXPECT_TRUE (z.Is <long >());
448
+ EXPECT_EQ (1234l , z.Get <long >());
449
+ #endif
442
450
}
443
451
444
452
TEST (Value, Uint) {
@@ -485,6 +493,14 @@ TEST(Value, Uint) {
485
493
EXPECT_EQ (2147483648u , z.Get <unsigned >());
486
494
EXPECT_EQ (2147483649u , z.Set (2147483649u ).Get <unsigned >());
487
495
EXPECT_EQ (2147483650u , z.Set <unsigned >(2147483650u ).Get <unsigned >());
496
+
497
+ #ifdef _MSC_VER
498
+ // unsigned long as unsigned on MSC platforms
499
+ RAPIDJSON_STATIC_ASSERT (sizeof (unsigned long ) == sizeof (unsigned ));
500
+ z.SetUint (1234 );
501
+ EXPECT_TRUE (z.Is <unsigned long >());
502
+ EXPECT_EQ (1234ul , z.Get <unsigned >());
503
+ #endif
488
504
}
489
505
490
506
TEST (Value, Int64) {
You can’t perform that action at this time.
0 commit comments