about summary refs log tree commit diff
path: root/third_party/nix/src/tests/language-tests.cc
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-11-21T14·26+0100
committerVincent Ambo <mail@tazj.in>2020-11-21T14·26+0100
commitcc27324d0226953943f408ce3c69ad7d648e005e (patch)
tree8bb0cc684739a625462dec6ef24008e2d6d20807 /third_party/nix/src/tests/language-tests.cc
parentcce0ad1bcd66922790cebf08f173c985fc619225 (diff)
chore(tvix): Use StatusOr API available in Abseil's version r/1888
The Abseil version of `StatusOr` does not come with the status macros
or the `Consume*` family of functions.

This change modifies the existing code to use the common denominator
of the API that is available between Abseil's own implementation of
`StatusOr` and the one from Tensorflow that we are currently using.

Change-Id: I5c37f68636a1fd54d153f95d7303ab8644abb774
Diffstat (limited to 'third_party/nix/src/tests/language-tests.cc')
-rw-r--r--third_party/nix/src/tests/language-tests.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/third_party/nix/src/tests/language-tests.cc b/third_party/nix/src/tests/language-tests.cc
index 189e1ede5c37..46e8c6ea80f7 100644
--- a/third_party/nix/src/tests/language-tests.cc
+++ b/third_party/nix/src/tests/language-tests.cc
@@ -257,9 +257,10 @@ class EvalStoreSuccessTest
 // Test pattern for files that should evaluate successfully but require a real
 // store.
 TEST_P(EvalStoreSuccessTest, Succeeds) {
-  std::unique_ptr<nix::LocalStore> store_ =
-      OpenTemporaryStore().ConsumeValueOrDie();
-  ref<Store> store = ref<Store>(store_.release());
+  absl::StatusOr<std::unique_ptr<nix::LocalStore>> store_ =
+      OpenTemporaryStore();
+  CHECK(store_.ok()) << "failed to open temporary store";
+  ref<Store> store = ref<Store>(store_->release());
   EvalState state({}, store);
   auto path = GetParam();