diff options
-rw-r--r-- | src/interp/interp-inl.h | 2 | ||||
-rw-r--r-- | src/test-interp.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/interp/interp-inl.h b/src/interp/interp-inl.h index fbec1014..9cab1fa9 100644 --- a/src/interp/interp-inl.h +++ b/src/interp/interp-inl.h @@ -297,7 +297,7 @@ RefPtr<U> RefPtr<T>::As() { template <typename T> bool RefPtr<T>::empty() const { - return obj_ != nullptr; + return obj_ == nullptr; } template <typename T> diff --git a/src/test-interp.cc b/src/test-interp.cc index 737f440c..d911aee2 100644 --- a/src/test-interp.cc +++ b/src/test-interp.cc @@ -61,7 +61,10 @@ class InterpTest : public ::testing::Test { TEST_F(InterpTest, Empty) { + ASSERT_TRUE(mod_.empty()); ReadModule({0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00}); + Instantiate(); + ASSERT_FALSE(mod_.empty()); } TEST_F(InterpTest, MVP) { |