20 std::vector<GDBLocalVariable> results;
22 CHECK_EQUAL(2u, results.size());
23 CHECK_EQUAL(
wxT(
"a|5"), results[0]);
24 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
27 TEST(TokenizeCompound)
29 std::vector<GDBLocalVariable> results;
31 CHECK_EQUAL(2u, results.size());
32 CHECK_EQUAL(
wxT(
"a|10"), results[0]);
33 CHECK_EQUAL(
wxT(
"compound|{\n a = 1, \n b = 2\n}"), results[1]);
38 std::vector<GDBLocalVariable> results;
40 CHECK_EQUAL(2u, results.size());
41 CHECK_EQUAL(
wxT(
"a|\"test\n\""), results[0]);
42 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
47 std::vector<GDBLocalVariable> results;
49 CHECK_EQUAL(2u, results.size());
50 CHECK_EQUAL(
wxT(
"a|\"test{\""), results[0]);
51 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
54 TEST(TokenizeString1Escaped1)
56 std::vector<GDBLocalVariable> results;
58 CHECK_EQUAL(2u, results.size());
59 CHECK_EQUAL(
wxT(
"a|\"test\\\"{\""), results[0]);
60 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
63 TEST(TokenizeString1Escaped2)
65 std::vector<GDBLocalVariable> results;
67 CHECK_EQUAL(2u, results.size());
68 CHECK_EQUAL(
wxT(
"a|\"test{\\\\\""), results[0]);
69 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
74 std::vector<GDBLocalVariable> results;
76 CHECK_EQUAL(2u, results.size());
77 CHECK_EQUAL(
wxT(
"a|123 '{'"), results[0]);
78 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
83 std::vector<GDBLocalVariable> results;
85 CHECK_EQUAL(2u, results.size());
86 CHECK_EQUAL(
wxT(
"a|123 '\"'"), results[0]);
87 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
92 std::vector<GDBLocalVariable> results;
94 CHECK_EQUAL(2u, results.size());
95 CHECK_EQUAL(
wxT(
"a|\"test's\""), results[0]);
96 CHECK_EQUAL(
wxT(
"b|10"), results[1]);
99 TEST(TokenizeCharSingleQuoteEscaped1)
101 std::vector<GDBLocalVariable> results;
103 CHECK_EQUAL(3u, results.size());
104 CHECK_EQUAL(
wxT(
"a|5"), results[0]);
105 CHECK_EQUAL(
wxT(
"l|{a = 100094, b = 39 '\\''}"), results[1]);
106 CHECK_EQUAL(
wxT(
"b|4"), results[2]);
108 TEST(TokenizeCharSingleQuoteEscaped2)
110 std::vector<GDBLocalVariable> results;
112 CHECK_EQUAL(3u, results.size());
113 CHECK_EQUAL(
wxT(
"a|5"), results[0]);
114 CHECK_EQUAL(
wxT(
"l|{a = 100094, b = 39 '\\\\'}"), results[1]);
115 CHECK_EQUAL(
wxT(
"b|4"), results[2]);
const wxScopedCharBuffer utf8_str() const
void TokenizeGDBLocals(std::vector< GDBLocalVariable > &results, wxString const &value)
bool operator==(wxString const &s, GDBLocalVariable const &v)
std::ostream & operator<<(std::ostream &stream, GDBLocalVariable const &s)