Skip to content

Commit 08bf730

Browse files
committed
Re-enable some tests
1 parent a66991a commit 08bf730

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/libexpr-tests/nix_api_expr.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ TEST_F(nix_api_expr_test, nix_expr_eval_add_numbers)
7373

7474
TEST_F(nix_api_expr_test, nix_expr_eval_drv)
7575
{
76-
#if 0
7776
auto expr = R"(derivation { name = "myname"; builder = "mybuilder"; system = "mysystem"; })";
7877
nix_expr_eval_from_string(nullptr, state, expr, ".", value);
7978
ASSERT_EQ(NIX_TYPE_ATTRS, nix_get_type(nullptr, value));
@@ -99,7 +98,6 @@ TEST_F(nix_api_expr_test, nix_expr_eval_drv)
9998

10099
nix_gc_decref(nullptr, valueResult);
101100
nix_state_free(stateResult);
102-
#endif
103101
}
104102

105103
TEST_F(nix_api_expr_test, nix_build_drv)
@@ -137,11 +135,9 @@ TEST_F(nix_api_expr_test, nix_build_drv)
137135
StorePath * outStorePath = nix_store_parse_path(ctx, store, outPath.c_str());
138136
ASSERT_EQ(false, nix_store_is_valid_path(ctx, store, outStorePath));
139137

140-
#if 0
141138
nix_store_realise(ctx, store, drvStorePath, nullptr, nullptr);
142139
auto is_valid_path = nix_store_is_valid_path(ctx, store, outStorePath);
143140
ASSERT_EQ(true, is_valid_path);
144-
#endif
145141

146142
// Clean up
147143
nix_store_path_free(drvStorePath);
@@ -170,17 +166,14 @@ TEST_F(nix_api_expr_test, nix_expr_realise_context_bad_build)
170166
)";
171167
nix_expr_eval_from_string(ctx, state, expr, ".", value);
172168
assert_ctx_ok();
173-
#if 0
174169
auto r = nix_string_realise(ctx, state, value, false);
175170
ASSERT_EQ(nullptr, r);
176171
ASSERT_EQ(ctx->last_err_code, NIX_ERR_NIX_ERROR);
177172
ASSERT_THAT(ctx->last_err, testing::Optional(testing::HasSubstr("failed with exit code 1")));
178-
#endif
179173
}
180174

181175
TEST_F(nix_api_expr_test, nix_expr_realise_context)
182176
{
183-
#if 0
184177
// TODO (ca-derivations): add a content-addressing derivation output, which produces a placeholder
185178
auto expr = R"(
186179
''
@@ -235,7 +228,6 @@ TEST_F(nix_api_expr_test, nix_expr_realise_context)
235228
EXPECT_THAT(names[2], testing::StrEq("not-actually-built-yet.drv"));
236229

237230
nix_realised_string_free(r);
238-
#endif
239231
}
240232

241233
const char * SAMPLE_USER_DATA = "whatever";

src/libexpr-tests/value/value.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ TEST_F(ValueTest, unsetValue)
1111
{
1212
Value unsetValue;
1313
ASSERT_EQ(false, unsetValue.isValid());
14-
// ASSERT_DEATH(unsetValue.type(), "");
14+
ASSERT_DEATH(unsetValue.type(), "");
1515
}
1616

1717
TEST_F(ValueTest, vInt)

0 commit comments

Comments
 (0)