From 1ae338c6c0f2432dd55d515f9c437a34c7964840 Mon Sep 17 00:00:00 2001 From: Dave Cunningham Date: Tue, 17 May 2016 22:29:59 -0400 Subject: [PATCH] Add tests --- .../error.function_too_many_args.jsonnet | 20 +++++++++++++++++++ ...rror.function_too_many_args.jsonnet.golden | 2 ++ 2 files changed, 22 insertions(+) create mode 100644 test_suite/error.function_too_many_args.jsonnet create mode 100644 test_suite/error.function_too_many_args.jsonnet.golden diff --git a/test_suite/error.function_too_many_args.jsonnet b/test_suite/error.function_too_many_args.jsonnet new file mode 100644 index 000000000..d671abca5 --- /dev/null +++ b/test_suite/error.function_too_many_args.jsonnet @@ -0,0 +1,20 @@ +/* +Copyright 2015 Google Inc. All rights reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +local foo(a, b) = [a, b]; + +foo(3, 4, 5) + diff --git a/test_suite/error.function_too_many_args.jsonnet.golden b/test_suite/error.function_too_many_args.jsonnet.golden new file mode 100644 index 000000000..1db8b05dd --- /dev/null +++ b/test_suite/error.function_too_many_args.jsonnet.golden @@ -0,0 +1,2 @@ +RUNTIME ERROR: Too many args, function has 2 parameter(s) + error.function_too_many_args.jsonnet:19:1-12