z_float_1_filetest.gno

0.42 Kb ยท 25 lines
 1package main
 2
 3import (
 4	"strings"
 5
 6	"gno.land/p/jeronimoalbi/expect"
 7)
 8
 9var (
10	output strings.Builder
11	t      = expect.MockTestingT(&output)
12)
13
14func main() {
15	expect.Value(t, 1.2).AsFloat().ToBeGreaterThan(1.3)
16	expect.Value(t, 1.2).AsFloat().Not().ToBeGreaterThan(1.1)
17
18	println(output.String())
19}
20
21// Output:
22// Expected values to be gerater than 1.3
23// Got: 1.2
24// Expected value to not to be greater than 1.1
25// Got: 1.2