mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-14 22:14:35 +00:00
test-symtab: Update after support for empty symtabs
Now that we support empty symtabs test-symtab needs to be updated so that it expects to have a corpus now, upon a binary with no exported symbols, albeit an empty one. * tests/test-symtab.cc (TEST_CASE("Symtab::Empty", "[symtab, basic]")): Adjust. (TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
a8a4ca8862
commit
efbc2a3e49
@ -66,10 +66,9 @@ TEST_CASE("Symtab::Empty", "[symtab, basic]")
|
|||||||
{
|
{
|
||||||
const std::string binary = "basic/empty.so";
|
const std::string binary = "basic/empty.so";
|
||||||
corpus_sptr corpus_ptr;
|
corpus_sptr corpus_ptr;
|
||||||
const fe_iface::status status = read_corpus(binary, corpus_ptr);
|
read_corpus(binary, corpus_ptr);
|
||||||
REQUIRE(!corpus_ptr);
|
REQUIRE(corpus_ptr->get_fun_symbol_map().empty());
|
||||||
|
REQUIRE(corpus_ptr->get_var_symbol_map().empty());
|
||||||
REQUIRE((status & fe_iface::STATUS_NO_SYMBOLS_FOUND));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")
|
TEST_CASE("Symtab::NoDebugInfo", "[symtab, basic]")
|
||||||
@ -241,10 +240,9 @@ TEST_CASE("Symtab::SymtabWithWhitelist", "[symtab, whitelist]")
|
|||||||
+ "basic/one_function_one_variable_irrelevant.whitelist");
|
+ "basic/one_function_one_variable_irrelevant.whitelist");
|
||||||
|
|
||||||
corpus_sptr corpus_ptr;
|
corpus_sptr corpus_ptr;
|
||||||
const fe_iface::status status =
|
|
||||||
read_corpus(binary, corpus_ptr, whitelists);
|
read_corpus(binary, corpus_ptr, whitelists);
|
||||||
REQUIRE(!corpus_ptr);
|
REQUIRE(corpus_ptr->get_fun_symbol_map().empty());
|
||||||
REQUIRE((status & fe_iface::STATUS_NO_SYMBOLS_FOUND));
|
REQUIRE(corpus_ptr->get_var_symbol_map().empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
GIVEN("we read the binary with only the function whitelisted")
|
GIVEN("we read the binary with only the function whitelisted")
|
||||||
|
Loading…
Reference in New Issue
Block a user