aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/lang/eval-okay-unsafeGetAttrPos.exp1
-rw-r--r--tests/functional/lang/eval-okay-unsafeGetAttrPos.imported-nix4
-rw-r--r--tests/functional/lang/eval-okay-unsafeGetAttrPos.nix4
-rw-r--r--tests/unit/libexpr/value/print.cc8
4 files changed, 13 insertions, 4 deletions
diff --git a/tests/functional/lang/eval-okay-unsafeGetAttrPos.exp b/tests/functional/lang/eval-okay-unsafeGetAttrPos.exp
new file mode 100644
index 000000000..c48e03014
--- /dev/null
+++ b/tests/functional/lang/eval-okay-unsafeGetAttrPos.exp
@@ -0,0 +1 @@
+{ column = 4; file = "/pwd/lang/eval-okay-unsafeGetAttrPos.imported-nix"; line = 6; }
diff --git a/tests/functional/lang/eval-okay-unsafeGetAttrPos.imported-nix b/tests/functional/lang/eval-okay-unsafeGetAttrPos.imported-nix
new file mode 100644
index 000000000..bdc364e76
--- /dev/null
+++ b/tests/functional/lang/eval-okay-unsafeGetAttrPos.imported-nix
@@ -0,0 +1,4 @@
+(
+
+
+ { y = "x"; })
diff --git a/tests/functional/lang/eval-okay-unsafeGetAttrPos.nix b/tests/functional/lang/eval-okay-unsafeGetAttrPos.nix
new file mode 100644
index 000000000..6d2cb86a6
--- /dev/null
+++ b/tests/functional/lang/eval-okay-unsafeGetAttrPos.nix
@@ -0,0 +1,4 @@
+let
+ pos = builtins.unsafeGetAttrPos "y" (import ./eval-okay-unsafeGetAttrPos.imported-nix);
+in
+pos
diff --git a/tests/unit/libexpr/value/print.cc b/tests/unit/libexpr/value/print.cc
index aabf156c2..d2d699a64 100644
--- a/tests/unit/libexpr/value/print.cc
+++ b/tests/unit/libexpr/value/print.cc
@@ -110,8 +110,8 @@ TEST_F(ValuePrintingTests, vLambda)
.up = nullptr,
.values = { }
};
- PosTable::Origin origin((std::monostate()));
- auto posIdx = state.positions.add(origin, 1, 1);
+ PosTable::Origin origin = state.positions.addOrigin(std::monostate(), 1);
+ auto posIdx = state.positions.add(origin, 0);
auto body = ExprInt(0);
auto formals = Formals {};
@@ -558,8 +558,8 @@ TEST_F(ValuePrintingTests, ansiColorsLambda)
.up = nullptr,
.values = { }
};
- PosTable::Origin origin((std::monostate()));
- auto posIdx = state.positions.add(origin, 1, 1);
+ PosTable::Origin origin = state.positions.addOrigin(std::monostate(), 1);
+ auto posIdx = state.positions.add(origin, 0);
auto body = ExprInt(0);
auto formals = Formals {};