mirror of
https://github.com/NixOS/nix
synced 2025-06-26 15:51:15 +02:00
Unit tests and external libraries
This commit is contained in:
parent
4fa8068b78
commit
17a8c2bfce
215 changed files with 873 additions and 461 deletions
25
src/libexpr-test/value/value.cc
Normal file
25
src/libexpr-test/value/value.cc
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "value.hh"
|
||||
|
||||
#include "tests/libstore.hh"
|
||||
|
||||
namespace nix {
|
||||
|
||||
class ValueTest : public LibStoreTest
|
||||
{};
|
||||
|
||||
TEST_F(ValueTest, unsetValue)
|
||||
{
|
||||
Value unsetValue;
|
||||
ASSERT_EQ(false, unsetValue.isValid());
|
||||
ASSERT_EQ(nThunk, unsetValue.type(true));
|
||||
ASSERT_DEATH(unsetValue.type(), "");
|
||||
}
|
||||
|
||||
TEST_F(ValueTest, vInt)
|
||||
{
|
||||
Value vInt;
|
||||
vInt.mkInt(42);
|
||||
ASSERT_EQ(true, vInt.isValid());
|
||||
}
|
||||
|
||||
} // namespace nix
|
Loading…
Add table
Add a link
Reference in a new issue