Skip to content

Commit

Permalink
Added skip tear down
Browse files Browse the repository at this point in the history
  • Loading branch information
Griezn committed Nov 5, 2024
1 parent 37b66f2 commit b2e1ea2
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions tests/queryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class QueryTestFixture : public ::testing::Test {
protected:
source_t gsource = {};
sink_t gsink = {};
bool skip_teardown = false;

void SetUp() override
{
Expand All @@ -25,6 +26,8 @@ class QueryTestFixture : public ::testing::Test {

void TearDown() override
{
if (skip_teardown)
return;
free_generator_source(&gsource);
free_generator_sink(&gsink);
}
Expand All @@ -38,6 +41,7 @@ bool check_join(const triple_t in1, const triple_t in2)

TEST_F(QueryTestFixture, test_query_join_death_no_children)
{
skip_teardown = true;
join_check_t conditions[1] = {check_join};
operator_t join_op = {
.type = JOIN,
Expand All @@ -53,6 +57,7 @@ TEST_F(QueryTestFixture, test_query_join_death_no_children)

TEST_F(QueryTestFixture, test_query_join_death_no_left_child)
{
skip_teardown = true;
join_check_t conditions[1] = {check_join};
operator_t join_op = {
.type = JOIN,
Expand All @@ -68,6 +73,7 @@ TEST_F(QueryTestFixture, test_query_join_death_no_left_child)

TEST_F(QueryTestFixture, test_query_join_death_no_right_child)
{
skip_teardown = true;
join_check_t conditions[1] = {check_join};
operator_t join_op = {
.type = JOIN,
Expand Down Expand Up @@ -354,10 +360,3 @@ TEST_F(QueryTestFixture, test_query_1)
};
ASSERT_TRUE(ARR_EQ(gsink.buffer.data, expected, 6));
}


/// @test
TEST_F(QueryTestFixture, test_query_2)
{

}

0 comments on commit b2e1ea2

Please sign in to comment.