@@ -116,26 +116,20 @@ TEST(CallTest, VariableRhombus) {
116116 arolla::TypedValue::FromValue (3 ),
117117 arolla::TypedValue::FromValue (4 ),
118118 };
119- ASSERT_OK_AND_ASSIGN (auto result, CallFunctorWithCompilationCache (
120- fn,
121- /* args=*/
122- {
123- inputs[0 ].AsRef (),
124- inputs[1 ].AsRef (),
125- inputs[2 ].AsRef (),
126- },
127- /* kwargs=*/ {}, /* eval_options=*/ {}));
119+ ASSERT_OK_AND_ASSIGN (
120+ auto result,
121+ CallFunctorWithCompilationCache (
122+ fn,
123+ /* args=*/ {inputs[0 ].AsRef (), inputs[1 ].AsRef (), inputs[2 ].AsRef ()},
124+ /* kwnames=*/ {}, /* eval_options=*/ {}));
128125 EXPECT_THAT (result.As <int32_t >(), IsOkAndHolds (2 * ((3 + 5 ) + (3 + 4 ))));
129126
130127 ASSERT_OK_AND_ASSIGN (
131128 result,
132129 CallFunctorWithCompilationCache (
133130 fn,
134- /* args=*/
135- {
136- inputs[0 ].AsRef (),
137- },
138- /* kwargs=*/ {{" c" , inputs[1 ].AsRef ()}, {" b" , inputs[2 ].AsRef ()}},
131+ /* args=*/ {inputs[0 ].AsRef (), inputs[1 ].AsRef (), inputs[2 ].AsRef ()},
132+ /* kwnames=*/ {" c" , " b" },
139133 /* eval_options=*/ {}));
140134 EXPECT_THAT (result.As <int32_t >(), IsOkAndHolds (2 * ((4 + 5 ) + (4 + 3 ))));
141135}
@@ -150,7 +144,7 @@ TEST(CallTest, VariableCycle) {
150144 ASSERT_OK_AND_ASSIGN (auto fn,
151145 CreateFunctor (returns_expr, koda_signature,
152146 {{" a" , var_a_expr}, {" b" , var_b_expr}}));
153- EXPECT_THAT (CallFunctorWithCompilationCache (fn, /* args=*/ {}, /* kwargs =*/ {},
147+ EXPECT_THAT (CallFunctorWithCompilationCache (fn, /* args=*/ {}, /* kwnames =*/ {},
154148 /* eval_options=*/ {}),
155149 StatusIs (absl::StatusCode::kInvalidArgument ,
156150 " variable [a] has a dependency cycle" ));
@@ -165,7 +159,7 @@ TEST(CallTest, JustLiteral) {
165159 CreateFunctor (returns_expr, koda_signature, {}));
166160 ASSERT_OK_AND_ASSIGN (
167161 auto result, CallFunctorWithCompilationCache (
168- fn, /* args=*/ {}, /* kwargs =*/ {}, /* eval_options=*/ {}));
162+ fn, /* args=*/ {}, /* kwnames =*/ {}, /* eval_options=*/ {}));
169163 EXPECT_THAT (result.As <int32_t >(), IsOkAndHolds (57 ));
170164}
171165
@@ -177,7 +171,7 @@ TEST(CallTest, MustBeScalar) {
177171 ASSERT_OK_AND_ASSIGN (auto fn,
178172 CreateFunctor (returns_expr, koda_signature, {}));
179173 ASSERT_OK_AND_ASSIGN (fn, fn.Reshape (DataSlice::JaggedShape::FlatFromSize (1 )));
180- EXPECT_THAT (CallFunctorWithCompilationCache (fn, /* args=*/ {}, /* kwargs =*/ {},
174+ EXPECT_THAT (CallFunctorWithCompilationCache (fn, /* args=*/ {}, /* kwnames =*/ {},
181175 /* eval_options=*/ {}),
182176 StatusIs (absl::StatusCode::kInvalidArgument ,
183177 " the first argument of kd.call must be a functor" ));
@@ -192,7 +186,7 @@ TEST(CallTest, NoBag) {
192186 CreateFunctor (returns_expr, koda_signature, {}));
193187 EXPECT_THAT (
194188 CallFunctorWithCompilationCache (fn.WithBag (nullptr ), /* args=*/ {},
195- /* kwargs =*/ {}, /* eval_options=*/ {}),
189+ /* kwnames =*/ {}, /* eval_options=*/ {}),
196190 StatusIs (absl::StatusCode::kInvalidArgument ,
197191 " the first argument of kd.call must be a functor" ));
198192}
@@ -209,7 +203,7 @@ TEST(CallTest, DataSliceVariable) {
209203 auto fn, CreateFunctor (returns_expr, koda_signature, {{" a" , var_a}}));
210204 ASSERT_OK_AND_ASSIGN (auto result, CallFunctorWithCompilationCache (
211205 fn, /* args=*/ {},
212- /* kwargs =*/ {}, /* eval_options=*/ {}));
206+ /* kwnames =*/ {}, /* eval_options=*/ {}));
213207 EXPECT_THAT (result.As <DataSlice>(),
214208 IsOkAndHolds (IsEquivalentTo (var_a.WithBag (fn.GetBag ()))));
215209}
@@ -240,7 +234,7 @@ TEST(CallTest, EvalError) {
240234 CallFunctorWithCompilationCache (
241235 fn,
242236 /* args=*/ {arolla::TypedRef::FromValue (input)},
243- /* kwargs =*/ {}, /* eval_options=*/ {}),
237+ /* kwnames =*/ {}, /* eval_options=*/ {}),
244238 StatusIs (absl::StatusCode::kInvalidArgument ,
245239 " expected numerics, got x: DATA_SLICE; while calling math.add "
246240 " with args {annotation.qtype(L['I.a'], DATA_SLICE), 57}; while "
@@ -277,7 +271,7 @@ TEST(CallTest, Cancellation) {
277271 expr::EvalOptions eval_options{.cancellation_context = cancel_ctx.get ()};
278272 EXPECT_THAT (CallFunctorWithCompilationCache (
279273 fn, /* args=*/ {arolla::TypedRef::FromValue (1 )},
280- /* kwargs =*/ {}, eval_options),
274+ /* kwnames =*/ {}, eval_options),
281275 StatusIs (absl::StatusCode::kCancelled ));
282276 }
283277 {
@@ -292,7 +286,7 @@ TEST(CallTest, Cancellation) {
292286 ASSERT_OK_AND_ASSIGN (auto result,
293287 CallFunctorWithCompilationCache (
294288 fn, /* args=*/ {arolla::TypedRef::FromValue (1 )},
295- /* kwargs =*/ {}, eval_options));
289+ /* kwnames =*/ {}, eval_options));
296290 EXPECT_THAT (result.As <int >(), IsOkAndHolds (3 ));
297291 }
298292}
0 commit comments