diff options
author | temporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d> | 2008-08-18 22:55:31 +0000 |
---|---|---|
committer | temporal <temporal@630680e5-0e50-0410-840e-4b1c322b438d> | 2008-08-18 22:55:31 +0000 |
commit | dd681ad786ced133e69dc36f8cebef9b392ebab4 (patch) | |
tree | 4f6d91e86420227cfc6c2312cbba76a5e9338c0c /src/google | |
parent | ea9d0d85fbbe5293969389c6008203e64558878c (diff) | |
download | protobuf-dd681ad786ced133e69dc36f8cebef9b392ebab4.tar.gz protobuf-dd681ad786ced133e69dc36f8cebef9b392ebab4.tar.bz2 protobuf-dd681ad786ced133e69dc36f8cebef9b392ebab4.zip |
More prep for 2.0.1:
* Fix version number test so that it accepts "2.0.1rc1".
* Add missing type_checkers.py to Makefile.am.
Diffstat (limited to 'src/google')
-rw-r--r-- | src/google/protobuf/stubs/common_unittest.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/google/protobuf/stubs/common_unittest.cc b/src/google/protobuf/stubs/common_unittest.cc index c339c5fd..bccc1e09 100644 --- a/src/google/protobuf/stubs/common_unittest.cc +++ b/src/google/protobuf/stubs/common_unittest.cc @@ -37,11 +37,12 @@ namespace { TEST(VersionTest, VersionMatchesConfig) { // Verify that the version string specified in config.h matches the one // in common.h. The config.h version is a string which may have a suffix - // like "beta", so we remove that. + // like "beta" or "rc1", so we remove that. string version = PACKAGE_VERSION; - int pos = version.size(); - while (pos > 0 && !ascii_isdigit(version[pos-1])) { - --pos; + int pos = 0; + while (pos < version.size() && + (ascii_isdigit(version[pos]) || version[pos] == '.')) { + ++pos; } version.erase(pos); |