diff options
author | Robert Griesemer <gri@golang.org> | 2021-08-04 15:18:37 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-08-06 20:34:43 +0000 |
commit | 5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a (patch) | |
tree | c058cc9c80087967f248f1e126664cb8ea08307b /src/cmd/compile/internal/types2/typeterm_test.go | |
parent | 110343e4a2a953a581e34e91e51cef08856b0b0a (diff) | |
download | go-5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a.tar.gz go-5aac85ad5ebfa9c2ecb01a3292bcf3513d876d7a.zip |
[dev.typeparams] cmd/compile/internal/types2: better names for things (cleanup)
- use the symbol π€ (as in π€niverse) instead of β€ to denote the set
of all types (for better readabilty, β€ is hard to distinguish from
T in some fonts)
- use isAll instead of isTop to test for the set of all types
- use allTermlist instead of topTermlist to denote the termlist
representing all types
Change-Id: Idcb0b3398782b38653338e65173c0dbb935e430a
Reviewed-on: https://go-review.googlesource.com/c/go/+/339891
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/typeterm_test.go')
-rw-r--r-- | src/cmd/compile/internal/types2/typeterm_test.go | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/cmd/compile/internal/types2/typeterm_test.go b/src/cmd/compile/internal/types2/typeterm_test.go index cc4e30d989..a8cc362f56 100644 --- a/src/cmd/compile/internal/types2/typeterm_test.go +++ b/src/cmd/compile/internal/types2/typeterm_test.go @@ -11,7 +11,7 @@ import ( var testTerms = map[string]*term{ "β
": nil, - "β€": {}, + "π€": {}, "int": {false, Typ[Int]}, "~int": {true, Typ[Int]}, "string": {false, Typ[String]}, @@ -46,14 +46,14 @@ func testTerm(name string) *term { func TestTermEqual(t *testing.T) { for _, test := range []string{ "β
β
T", - "β€ β€ T", + "π€ π€ T", "int int T", "~int ~int T", - "β
β€ F", + "β
π€ F", "β
int F", "β
~int F", - "β€ int F", - "β€ ~int F", + "π€ int F", + "π€ ~int F", "int ~int F", } { args := split(test, 3) @@ -74,12 +74,12 @@ func TestTermEqual(t *testing.T) { func TestTermUnion(t *testing.T) { for _, test := range []string{ "β
β
β
β
", - "β
β€ β€ β
", + "β
π€ π€ β
", "β
int int β
", "β
~int ~int β
", - "β€ β€ β€ β
", - "β€ int β€ β
", - "β€ ~int β€ β
", + "π€ π€ π€ β
", + "π€ int π€ β
", + "π€ ~int π€ β
", "int int int β
", "int ~int ~int β
", "int string int string", @@ -87,11 +87,11 @@ func TestTermUnion(t *testing.T) { "~int ~string ~int ~string", // union is symmetric, but the result order isn't - repeat symmetric cases explictly - "β€ β
β€ β
", + "π€ β
π€ β
", "int β
int β
", "~int β
~int β
", - "int β€ β€ β
", - "~int β€ β€ β
", + "int π€ π€ β
", + "~int π€ π€ β
", "~int int ~int β
", "string int string int", "~string int ~string int", @@ -111,12 +111,12 @@ func TestTermUnion(t *testing.T) { func TestTermIntersection(t *testing.T) { for _, test := range []string{ "β
β
β
", - "β
β€ β
", + "β
π€ β
", "β
int β
", "β
~int β
", - "β€ β€ β€", - "β€ int int", - "β€ ~int ~int", + "π€ π€ π€", + "π€ int int", + "π€ ~int ~int", "int int int", "int ~int int", "int string β
", @@ -141,7 +141,7 @@ func TestTermIntersection(t *testing.T) { func TestTermIncludes(t *testing.T) { for _, test := range []string{ "β
int F", - "β€ int T", + "π€ int T", "int int T", "~int int T", "string int F", @@ -160,14 +160,14 @@ func TestTermIncludes(t *testing.T) { func TestTermSubsetOf(t *testing.T) { for _, test := range []string{ "β
β
T", - "β€ β€ T", + "π€ π€ T", "int int T", "~int ~int T", - "β
β€ T", + "β
π€ T", "β
int T", "β
~int T", - "β€ int F", - "β€ ~int F", + "π€ int F", + "π€ ~int F", "int ~int T", } { args := split(test, 3) |