aboutsummaryrefslogtreecommitdiffstats
path: root/eval/src/tests
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2020-11-30 13:09:01 +0000
committerArne Juul <arnej@verizonmedia.com>2020-11-30 13:09:01 +0000
commit958c6b36103f9d638cf25a83ab9b79eae85d30a7 (patch)
treedde4d797cfdbb5ceb7d540c4cd8aa7b4802f26de /eval/src/tests
parent1161a1a21db6d967cecf0bd16887d608285cc53c (diff)
out-of-bound verbatim label not allowed, use dynamic peek
Diffstat (limited to 'eval/src/tests')
-rw-r--r--eval/src/tests/eval/tensor_function/tensor_function_test.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval/src/tests/eval/tensor_function/tensor_function_test.cpp b/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
index 9441061d6e1..82b1312255d 100644
--- a/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
+++ b/eval/src/tests/eval/tensor_function/tensor_function_test.cpp
@@ -300,13 +300,15 @@ TEST("require that tensor create works") {
TEST("require that single value tensor peek works") {
EvalCtx ctx(SimpleTensorEngine::ref());
size_t a_id = ctx.add_tensor(ctx.make_double(1.0));
+ size_t b_id = ctx.add_tensor(ctx.make_double(1000.0));
Value::UP my_const = ctx.make_mixed_tensor(1.0, 2.0, 3.0, 4.0);
Value::UP expect = ctx.make_vector({2.0, 3.0, 0.0});
const auto &a = inject(ValueType::from_spec("double"), a_id, ctx.stash);
+ const auto &b = inject(ValueType::from_spec("double"), b_id, ctx.stash);
const auto &t = const_value(*my_const, ctx.stash);
const auto &peek1 = peek(t, {{"x", "foo"}, {"y", a}}, ctx.stash);
const auto &peek2 = peek(t, {{"x", "bar"}, {"y", size_t(0)}}, ctx.stash);
- const auto &peek3 = peek(t, {{"x", "bar"}, {"y", size_t(1000)}}, ctx.stash);
+ const auto &peek3 = peek(t, {{"x", "bar"}, {"y", b}}, ctx.stash);
const auto &fun = create(ValueType::from_spec("tensor(x[3])"),
{
{{{"x", 0}}, peek1},