aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/stubs/strutil_unittest.cc
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2015-06-15 21:42:57 -0700
committerFeng Xiao <xfxyjwf@gmail.com>2015-06-17 11:19:46 -0700
commit818c5eee08840355d70d2f3bdf1a2f17986a5e70 (patch)
treee6db0b1344385f8c48820c58d7297f653bff39f7 /src/google/protobuf/stubs/strutil_unittest.cc
parente96ff30120a3834f7d1e31e43e591bf7cfbd731f (diff)
downloadprotobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.tar.gz
protobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.tar.bz2
protobuf-818c5eee08840355d70d2f3bdf1a2f17986a5e70.zip
Fix broken builds.
Diffstat (limited to 'src/google/protobuf/stubs/strutil_unittest.cc')
-rw-r--r--src/google/protobuf/stubs/strutil_unittest.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/strutil_unittest.cc b/src/google/protobuf/stubs/strutil_unittest.cc
index 3e849324..5d62fc4a 100644
--- a/src/google/protobuf/stubs/strutil_unittest.cc
+++ b/src/google/protobuf/stubs/strutil_unittest.cc
@@ -38,6 +38,10 @@
#include <google/protobuf/testing/googletest.h>
#include <gtest/gtest.h>
+#ifdef _WIN32
+#define snprintf _snprintf
+#endif
+
namespace google {
namespace protobuf {
namespace {
@@ -461,7 +465,7 @@ TEST(Base64, EscapeAndUnescape) {
encode_length);
// Is it the expected encoded value?
- EXPECT_STREQ(encode_buffer, base64_tests[i].cyphertext);
+ ASSERT_STREQ(encode_buffer, base64_tests[i].cyphertext);
// If we encode it into a buffer of exactly the right length...
memset(encode_buffer, 0, sizeof(encode_buffer));
@@ -774,7 +778,6 @@ TEST(Base64, EscapeAndUnescape) {
// Now try the long strings, this tests the streaming
for (int i = 0; i < sizeof(base64_strings) / sizeof(base64_strings[0]);
++i) {
-
const unsigned char* unsigned_plaintext =
reinterpret_cast<const unsigned char*>(base64_strings[i].plaintext);
int plain_length = strlen(base64_strings[i].plaintext);