@@ -391,6 +391,7 @@ static const int kSimpleInt = 2;
391
391
static const int kSimplePriority = 100 ;
392
392
static const double kSimpleDouble = 3.4 ;
393
393
static const bool kSimpleBool = true ;
394
+ static const double kLongDouble = 0.123456789876543 ;
394
395
395
396
TEST_F (FirebaseDatabaseTest, TestSetAndGetSimpleValues) {
396
397
const char * test_name = test_info_->name ();
@@ -415,12 +416,15 @@ TEST_F(FirebaseDatabaseTest, TestSetAndGetSimpleValues) {
415
416
ref.Child (test_name)
416
417
.Child (" IntAndPriority" )
417
418
.SetValueAndPriority (kSimpleInt , kSimplePriority );
419
+ firebase::Future<void > f7 =
420
+ ref.Child (test_name).Child (" LongDouble" ).SetValue (kLongDouble );
418
421
WaitForCompletion (f1, " SetSimpleString" );
419
422
WaitForCompletion (f2, " SetSimpleInt" );
420
423
WaitForCompletion (f3, " SetSimpleDouble" );
421
424
WaitForCompletion (f4, " SetSimpleBool" );
422
425
WaitForCompletion (f5, " SetSimpleTimestamp" );
423
426
WaitForCompletion (f6, " SetSimpleIntAndPriority" );
427
+ WaitForCompletion (f7, " SetLongDouble" );
424
428
}
425
429
426
430
// Get the values that we just set, and confirm that they match what we
@@ -439,12 +443,15 @@ TEST_F(FirebaseDatabaseTest, TestSetAndGetSimpleValues) {
439
443
ref.Child (test_name).Child (" Timestamp" ).GetValue ();
440
444
firebase::Future<firebase::database::DataSnapshot> f6 =
441
445
ref.Child (test_name).Child (" IntAndPriority" ).GetValue ();
446
+ firebase::Future<firebase::database::DataSnapshot> f7 =
447
+ ref.Child (test_name).Child (" LongDouble" ).GetValue ();
442
448
WaitForCompletion (f1, " GetSimpleString" );
443
449
WaitForCompletion (f2, " GetSimpleInt" );
444
450
WaitForCompletion (f3, " GetSimpleDouble" );
445
451
WaitForCompletion (f4, " GetSimpleBool" );
446
452
WaitForCompletion (f5, " GetSimpleTimestamp" );
447
453
WaitForCompletion (f6, " GetSimpleIntAndPriority" );
454
+ WaitForCompletion (f7, " GetLongDouble" );
448
455
449
456
// Get the current time to compare to the Timestamp.
450
457
int64_t current_time_milliseconds =
@@ -458,6 +465,7 @@ TEST_F(FirebaseDatabaseTest, TestSetAndGetSimpleValues) {
458
465
TimestampIsNear (current_time_milliseconds));
459
466
EXPECT_EQ (f6.result ()->value ().AsInt64 (), kSimpleInt );
460
467
EXPECT_EQ (f6.result ()->priority ().AsInt64 (), kSimplePriority );
468
+ EXPECT_EQ (f7.result ()->value ().AsDouble (), kLongDouble );
461
469
}
462
470
}
463
471
0 commit comments