@@ -462,7 +462,8 @@ TEST(Pointer, ConstructorWithToken) {
462
462
463
463
TEST (Pointer, CopyConstructor) {
464
464
{
465
- Pointer p (" /foo/0" );
465
+ CrtAllocator allocator;
466
+ Pointer p (" /foo/0" , &allocator);
466
467
Pointer q (p);
467
468
EXPECT_TRUE (q.IsValid ());
468
469
EXPECT_EQ (2u , q.GetTokenCount ());
@@ -471,6 +472,7 @@ TEST(Pointer, CopyConstructor) {
471
472
EXPECT_EQ (1u , q.GetTokens ()[1 ].length );
472
473
EXPECT_STREQ (" 0" , q.GetTokens ()[1 ].name );
473
474
EXPECT_EQ (0u , q.GetTokens ()[1 ].index );
475
+ EXPECT_EQ (&p.GetAllocator (), &q.GetAllocator ());
474
476
}
475
477
476
478
// Static tokens
@@ -489,7 +491,8 @@ TEST(Pointer, CopyConstructor) {
489
491
490
492
TEST (Pointer, Assignment) {
491
493
{
492
- Pointer p (" /foo/0" );
494
+ CrtAllocator allocator;
495
+ Pointer p (" /foo/0" , &allocator);
493
496
Pointer q;
494
497
q = p;
495
498
EXPECT_TRUE (q.IsValid ());
@@ -499,6 +502,7 @@ TEST(Pointer, Assignment) {
499
502
EXPECT_EQ (1u , q.GetTokens ()[1 ].length );
500
503
EXPECT_STREQ (" 0" , q.GetTokens ()[1 ].name );
501
504
EXPECT_EQ (0u , q.GetTokens ()[1 ].index );
505
+ EXPECT_NE (&p.GetAllocator (), &q.GetAllocator ());
502
506
q = q;
503
507
EXPECT_TRUE (q.IsValid ());
504
508
EXPECT_EQ (2u , q.GetTokenCount ());
@@ -507,6 +511,7 @@ TEST(Pointer, Assignment) {
507
511
EXPECT_EQ (1u , q.GetTokens ()[1 ].length );
508
512
EXPECT_STREQ (" 0" , q.GetTokens ()[1 ].name );
509
513
EXPECT_EQ (0u , q.GetTokens ()[1 ].index );
514
+ EXPECT_NE (&p.GetAllocator (), &q.GetAllocator ());
510
515
}
511
516
512
517
// Static tokens
0 commit comments