-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdoc.go
45 lines (39 loc) · 1 KB
/
doc.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Boolean data type has two possible truth values to represent logic.
//
// 📦 Package: https://pkg.go.dev/github.com/golangf/extra-boolean
//
// 📘 Wiki: https://github.com/golangf/extra-boolean/wiki.
package boolean
// func TestParse(t *testing.T) {
// var a, b bool
// a = Parse("1")
// b = true
// if a != b {
// t.Errorf(`Parse("1") = %t, expected %t`, a, b)
// }
// a = Parse("truthy")
// b = true
// if a != b {
// t.Errorf(`Parse("truthy") = %t, expected %t`, a, b)
// }
// a = Parse("not off")
// b = true
// if a != b {
// t.Errorf(`Parse("not off") = %t, expected %t`, a, b)
// }
// a = Parse("not true")
// b = false
// if a != b {
// t.Errorf(`Parse("not true") = %t, expected %t`, a, b)
// }
// a = Parse("inactive")
// b = false
// if a != b {
// t.Errorf(`Parse("inactive") = %t, expected %t`, a, b)
// }
// a = Parse("disabled")
// b = false
// if a != b {
// t.Errorf(`Parse("disabled") = %t, expected %t`, a, b)
// }
// }