From 78878105873fc1826a3d6a21356d49873e206785 Mon Sep 17 00:00:00 2001 From: Martin Atkins Date: Mon, 22 Feb 2021 16:45:46 -0800 Subject: specsuite: Fix some regressions Lately we've made some changes that have affected the behavior of the specsuite tests, causing them to fail. Much of this was caused by changes to the harness itself (based on hcldec), although one break in particular here was an intentional change to the implementation of modulo in upstream cty to make it produce a more accurate result when used with a fractional divisor. --- cmd/hclspecsuite/runner.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/hclspecsuite/runner.go b/cmd/hclspecsuite/runner.go index 9e48f96..db9b13f 100644 --- a/cmd/hclspecsuite/runner.go +++ b/cmd/hclspecsuite/runner.go @@ -11,6 +11,7 @@ import ( "sort" "strings" + "github.com/zclconf/go-cty-debug/ctydebug" "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/convert" ctyjson "github.com/zclconf/go-cty/cty/json" @@ -226,8 +227,9 @@ func (r *Runner) runTestInput(specFilename, inputFilename string, tf *TestFile) Severity: hcl.DiagError, Summary: "Incorrect result value", Detail: fmt.Sprintf( - "Input file %s produced %#v, but was expecting %#v.", + "Input file %s produced %#v, but was expecting %#v.\n\n%s", inputFilename, val, tf.Result, + ctydebug.DiffValues(tf.Result, val), ), }) } -- cgit v1.2.3