mirror of https://github.com/YosysHQ/nextpnr.git
ice40: Initialize context pointer in tests (#1568)
If the chipdb is not found, the Setup() call throws, but GTest still calls TearDown, which then stumbles over the uninitialized pointer. This makes the tests fail without valgrind errors or segfaults at least.
This commit is contained in:
parent
e7f9060efb
commit
5d45520bb2
|
|
@ -37,7 +37,7 @@ class HX1KTest : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(HX1KTest, bel_names)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class HX8KTest : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(HX8KTest, bel_names)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class LP1KTest : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(LP1KTest, bel_names)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class LP384Test : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(LP384Test, bel_names)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class LP8KTest : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(LP8KTest, bel_names)
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class UP5KTest : public ::testing::Test
|
|||
virtual void TearDown() { delete ctx; }
|
||||
|
||||
ArchArgs chipArgs;
|
||||
Context *ctx;
|
||||
Context *ctx = nullptr;
|
||||
};
|
||||
|
||||
TEST_F(UP5KTest, bel_names)
|
||||
|
|
|
|||
Loading…
Reference in New Issue