nix-super/tests/unit/libexpr/value/value.cc

26 lines
420 B
C++
Raw Normal View History

#include "value.hh"
#include "tests/libstore.hh"
namespace nix {
class ValueTest : public LibStoreTest
{};
TEST_F(ValueTest, unsetValue)
{
Value unsetValue;
2024-04-20 15:15:05 +03:00
ASSERT_EQ(false, unsetValue.isValid());
ASSERT_EQ(nThunk, unsetValue.type(true));
ASSERT_DEATH(unsetValue.type(), "");
}
TEST_F(ValueTest, vInt)
{
Value vInt;
vInt.mkInt(42);
2024-04-20 15:15:05 +03:00
ASSERT_EQ(true, vInt.isValid());
}
} // namespace nix