Skip to content

Commit

Permalink
Fix error when loading both gnu.cfg and bsd.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
chrchr-github committed Feb 6, 2024
1 parent eaac4a2 commit f13b4d4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 0 additions & 2 deletions cfg/gnu.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,6 @@
<not-null/>
</arg>
</function>
<!-- int timercmp(struct timeval *a, struct timeval *b, CMP)-->
<define name="timercmp(a,b,CMP)" value="(((a)-&gt;tv_sec == (b)-&gt;tv_sec) ? ((a)-&gt;tv_usec CMP (b)-&gt;tv_usec) : ((a)-&gt;tv_sec CMP (b)-&gt;tv_sec))"/>
<!-- int __builtin_types_compatible_p (type1, type2) -->
<function name="__builtin_types_compatible_p">
<noreturn>false</noreturn>
Expand Down
8 changes: 8 additions & 0 deletions test/testlibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class TestLibrary : public TestFixture {
TEST_CASE(container);
TEST_CASE(version);
TEST_CASE(loadLibErrors);
TEST_CASE(loadLibCombinations);
}

static bool loadxmldata(Library &lib, const char xmldata[], std::size_t len)
Expand Down Expand Up @@ -1065,6 +1066,13 @@ class TestLibrary : public TestFixture {
// comma followed by dot
LOADLIB_ERROR_INVALID_RANGE("-10:0,.5:");
}

void loadLibCombinations() const {
{
const Settings s = settingsBuilder().library("std.cfg").library("gnu.cfg").library("bsd.cfg").build();
ASSERT_EQUALS(s.library.defines.empty(), false);
}
}
};

REGISTER_TEST(TestLibrary)

0 comments on commit f13b4d4

Please sign in to comment.