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 23 matching lines...) Expand all Loading... |
34 #include <google/protobuf/stubs/casts.h> | 34 #include <google/protobuf/stubs/casts.h> |
35 #include <google/protobuf/stubs/common.h> | 35 #include <google/protobuf/stubs/common.h> |
36 #include <google/protobuf/stubs/strutil.h> | 36 #include <google/protobuf/stubs/strutil.h> |
37 #include <google/protobuf/stubs/substitute.h> | 37 #include <google/protobuf/stubs/substitute.h> |
38 | 38 |
39 #include <google/protobuf/testing/googletest.h> | 39 #include <google/protobuf/testing/googletest.h> |
40 #include <gtest/gtest.h> | 40 #include <gtest/gtest.h> |
41 | 41 |
42 namespace google { | 42 namespace google { |
43 namespace protobuf { | 43 namespace protobuf { |
| 44 using internal::NewCallback; |
| 45 using internal::NewPermanentCallback; |
44 namespace { | 46 namespace { |
45 | 47 |
46 // TODO(kenton): More tests. | 48 // TODO(kenton): More tests. |
47 | 49 |
48 #ifdef PACKAGE_VERSION // only defined when using automake, not MSVC | 50 #ifdef PACKAGE_VERSION // only defined when using automake, not MSVC |
49 | 51 |
50 TEST(VersionTest, VersionMatchesConfig) { | 52 TEST(VersionTest, VersionMatchesConfig) { |
51 // Verify that the version string specified in config.h matches the one | 53 // Verify that the version string specified in config.h matches the one |
52 // in common.h. The config.h version is a string which may have a suffix | 54 // in common.h. The config.h version is a string which may have a suffix |
53 // like "beta" or "rc1", so we remove that. | 55 // like "beta" or "rc1", so we remove that. |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 | 349 |
348 TEST_F(ClosureTest, TestPermanentClosureDeleteInCallback) { | 350 TEST_F(ClosureTest, TestPermanentClosureDeleteInCallback) { |
349 permanent_closure_ = NewPermanentCallback((ClosureTest*) this, | 351 permanent_closure_ = NewPermanentCallback((ClosureTest*) this, |
350 &ClosureTest::DeleteClosureInCallback); | 352 &ClosureTest::DeleteClosureInCallback); |
351 permanent_closure_->Run(); | 353 permanent_closure_->Run(); |
352 } | 354 } |
353 | 355 |
354 } // anonymous namespace | 356 } // anonymous namespace |
355 } // namespace protobuf | 357 } // namespace protobuf |
356 } // namespace google | 358 } // namespace google |
OLD | NEW |