[PATCH] Make test-var-path-expr.cc more portable
- From: Dodji Seketeli <dodji seketeli org>
- To: Nemiver Development <nemiver-list gnome org>
- Subject: [PATCH] Make test-var-path-expr.cc more portable
- Date: Sun, 19 Feb 2012 12:33:00 +0100
This is a small test suite tweak. It avoids the test-var-patch test
to depend too much on the version of the libstdc++ we use. In
practice, before the patch, the test was failing on my Fedora 15 and
was passing on my Fedora 16 system.
Fixed thus and applied to master.
commit d20f309b5c691b6713ed984eb9666ffbeb638ffb
Author: Dodji Seketeli <dodji seketeli org>
Date: Sat Feb 18 16:09:57 2012 +0100
Make test-var-path-expr.cc more portable
* tests/test-var-path-expr.cc (on_variable_expr_path): Test the
presence of the string ".m_first_name" in the path expression,
instead of trying to look for something exact that would depend on
a particular implementation of libstdc++.
diff --git a/tests/test-var-path-expr.cc b/tests/test-var-path-expr.cc
index 34063cf..9d6208d 100644
--- a/tests/test-var-path-expr.cc
+++ b/tests/test-var-path-expr.cc
@@ -73,8 +73,8 @@ static void
on_variable_expr_path (const IDebugger::VariableSafePtr a_var)
{
MESSAGE ("var expr path: " << a_var->path_expression ());
- BOOST_REQUIRE (a_var->path_expression ()
- == "((((person).m_first_name)).npos)");
+ BOOST_REQUIRE (a_var->path_expression ().find (".m_first_name")
+ != UString::npos);
// This should help delete all the variables (and their
// backend-side variable objects) created during this test, along
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]