OLD | NEW |
1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 kBlockSizes_case); | 686 kBlockSizes_case); |
687 Tokenizer tokenizer2(&input2, &error_collector); | 687 Tokenizer tokenizer2(&input2, &error_collector); |
688 | 688 |
689 tokenizer.Next(); | 689 tokenizer.Next(); |
690 tokenizer2.Next(); | 690 tokenizer2.Next(); |
691 | 691 |
692 EXPECT_EQ("prev", tokenizer.current().text); | 692 EXPECT_EQ("prev", tokenizer.current().text); |
693 EXPECT_EQ("prev", tokenizer2.current().text); | 693 EXPECT_EQ("prev", tokenizer2.current().text); |
694 | 694 |
695 string prev_trailing_comments; | 695 string prev_trailing_comments; |
696 std::vector<string> detached_comments; | 696 vector<string> detached_comments; |
697 string next_leading_comments; | 697 string next_leading_comments; |
698 tokenizer.NextWithComments(&prev_trailing_comments, &detached_comments, | 698 tokenizer.NextWithComments(&prev_trailing_comments, &detached_comments, |
699 &next_leading_comments); | 699 &next_leading_comments); |
700 tokenizer2.NextWithComments(NULL, NULL, NULL); | 700 tokenizer2.NextWithComments(NULL, NULL, NULL); |
701 EXPECT_EQ("next", tokenizer.current().text); | 701 EXPECT_EQ("next", tokenizer.current().text); |
702 EXPECT_EQ("next", tokenizer2.current().text); | 702 EXPECT_EQ("next", tokenizer2.current().text); |
703 | 703 |
704 EXPECT_EQ(kDocCommentCases_case.prev_trailing_comments, | 704 EXPECT_EQ(kDocCommentCases_case.prev_trailing_comments, |
705 prev_trailing_comments); | 705 prev_trailing_comments); |
706 | 706 |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
987 | 987 |
988 // Only "foo" should have been read. | 988 // Only "foo" should have been read. |
989 EXPECT_EQ(strlen("foo"), input.ByteCount()); | 989 EXPECT_EQ(strlen("foo"), input.ByteCount()); |
990 } | 990 } |
991 | 991 |
992 | 992 |
993 } // namespace | 993 } // namespace |
994 } // namespace io | 994 } // namespace io |
995 } // namespace protobuf | 995 } // namespace protobuf |
996 } // namespace google | 996 } // namespace google |
OLD | NEW |