summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Vakulenko <avakulenko@google.com>2015-10-23 13:46:55 -0700
committerAlex Vakulenko <avakulenko@google.com>2015-10-23 13:48:57 -0700
commit76601775391e2593c8e12a594a1b97271254c092 (patch)
treeb59a331e2133f88188a08f643311571db20510f2
parentd4d2d739c3b22e686881df519fc40e6f331d5eae (diff)
downloadlibchromeos-76601775391e2593c8e12a594a1b97271254c092.tar.gz
Fix Any::TypeMismatch unit test
The expected error message relied too much on demangling of std::string. On Android, it shows as std::__1::basic_string<...>. So just use a rough regex to match the error message but do not use it verbatim. Change-Id: I2c6c7810bf028118cf2ebeb7bd04f47d1da835e5
-rw-r--r--brillo/any_unittest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/brillo/any_unittest.cc b/brillo/any_unittest.cc
index 506559b..2af8845 100644
--- a/brillo/any_unittest.cc
+++ b/brillo/any_unittest.cc
@@ -245,7 +245,7 @@ TEST(Any, TypeMismatch) {
val = std::string("123");
EXPECT_DEATH(val.GetAsInteger(),
- "Unable to convert value of type 'std::string' to integer");
+ "Unable to convert value of type 'std::.*' to integer");
Any empty;
EXPECT_DEATH(empty.GetAsInteger(), "Must not be called on an empty Any");