docs-v2/content/flux/v0/stdlib/testing/assertequalvalues.md

1.7 KiB

title description menu weight flux/v0/tags introduced
testing.assertEqualValues() function `testing.assertEqualValues()` tests whether two values are equal.
flux_v0_ref
name parent identifier
testing.assertEqualValues testing testing/assertEqualValues
101
tests
0.141.0

testing.assertEqualValues() tests whether two values are equal.

Function type signature
(got: A, want: A) => stream[{v: A, _diff: string}]

{{% caption %}} For more information, see Function type signatures. {{% /caption %}}

Parameters

got

({{< req >}}) Value to test.

want

({{< req >}}) Expected value to test against.

Examples

Test if two values are equal

import "testing"

testing.assertEqualValues(got: 5, want: 12)

{{< expand-wrapper >}} {{% expand "View example input" %}}

Input data

_diff v
- 12
+ 5

{{% /expand %}} {{< /expand-wrapper >}}