Skip to content

Commit 9703af1

Browse files
petr-bauchdanpoe
authored andcommitted
Update unit test
to the new interface.
1 parent 6565c4b commit 9703af1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

unit/memory-analyzer/gdb_api.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,39 +179,39 @@ TEST_CASE("gdb api test", "[core][memory-analyzer]")
179179

180180
{
181181
auto value = gdb_api.get_memory("s");
182-
REQUIRE(std::regex_match(value.address, hex_addr));
182+
REQUIRE(std::regex_match(value.address.string(), hex_addr));
183183
REQUIRE(value.pointee.empty());
184184
REQUIRE(value.character.empty());
185185
REQUIRE(*value.string == "abc");
186186
}
187187

188188
{
189189
auto value = gdb_api.get_memory("p");
190-
REQUIRE(std::regex_match(value.address, hex_addr));
190+
REQUIRE(std::regex_match(value.address.string(), hex_addr));
191191
REQUIRE(value.pointee == "x");
192192
REQUIRE(value.character.empty());
193193
REQUIRE(!value.string);
194194
}
195195

196196
{
197197
auto value = gdb_api.get_memory("vp");
198-
REQUIRE(std::regex_match(value.address, hex_addr));
198+
REQUIRE(std::regex_match(value.address.string(), hex_addr));
199199
REQUIRE(value.pointee == "x");
200200
REQUIRE(value.character.empty());
201201
REQUIRE(!value.string);
202202
}
203203

204204
{
205205
auto value = gdb_api.get_memory("np");
206-
REQUIRE(value.address == "0x0");
206+
REQUIRE(value.address.is_null());
207207
REQUIRE(value.pointee.empty());
208208
REQUIRE(value.character.empty());
209209
REQUIRE(!value.string);
210210
}
211211

212212
{
213213
auto value = gdb_api.get_memory("vp_string");
214-
REQUIRE(std::regex_match(value.address, hex_addr));
214+
REQUIRE(std::regex_match(value.address.string(), hex_addr));
215215
REQUIRE(value.pointee.empty());
216216
REQUIRE(value.character.empty());
217217
REQUIRE(!value.string);
@@ -225,7 +225,7 @@ TEST_CASE("gdb api test", "[core][memory-analyzer]")
225225

226226
{
227227
auto value = gdb_api.get_memory("&x");
228-
REQUIRE(std::regex_match(value.address, hex_addr));
228+
REQUIRE(std::regex_match(value.address.string(), hex_addr));
229229
REQUIRE(value.pointee == "x");
230230
REQUIRE(value.character.empty());
231231
REQUIRE(!value.string);

0 commit comments

Comments
 (0)