diff options
author | Damian Gryski <[email protected]> | 2023-03-24 10:42:34 -0700 |
---|---|---|
committer | Ron Evans <[email protected]> | 2023-03-30 21:10:54 +0200 |
commit | 53b95cad083cb0ca30f94f94f1ee00f69aa78f6a (patch) | |
tree | 3b035253720a58905f5334208b2118bae341d76f /src/reflect | |
parent | e7bd22edf25b1c54058553a173a6d259dff6c09c (diff) | |
download | tinygo-53b95cad083cb0ca30f94f94f1ee00f69aa78f6a.tar.gz tinygo-53b95cad083cb0ca30f94f94f1ee00f69aa78f6a.zip |
reflect: uncomment Type.String() tests that pass
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/all_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index 18712a115..b21abfefa 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -129,6 +129,7 @@ var typeTests = []pair{ }{}, "struct { c chan *int32; d float32 }", }, + /* // TODO(tinygo): No function support {struct{ x (func(a int8, b int32)) }{}, "func(int8, int32)"}, {struct { x struct { @@ -136,7 +137,7 @@ var typeTests = []pair{ } }{}, "struct { c func(chan *reflect_test.integer, *int8) }", - }, + }, */ {struct { x struct { a int8 @@ -187,6 +188,7 @@ var typeTests = []pair{ }{}, "struct { a int8; b int8; c int8; d int8; e int8; f int32 }", }, + /* // TODO(tinygo): Reflects tags aren't properly quoted {struct { x struct { a int8 `reflect:"hi there"` @@ -224,6 +226,7 @@ var typeTests = []pair{ }{}, "struct { int32; int64 }", }, + */ } var valueTests = []pair{ @@ -249,16 +252,18 @@ var valueTests = []pair{ {new(**integer), "**reflect_test.integer(0)"}, {new(map[string]int32), "map[string]int32{<can't iterate on maps>}"}, {new(chan<- string), "chan<- string"}, - {new(func(a int8, b int32)), "func(int8, int32)(0)"}, + //{new(func(a int8, b int32)), "func(int8, int32)(0)"}, // TODO(tinygo): No function support {new(struct { c chan *int32 d float32 }), "struct { c chan *int32; d float32 }{chan *int32, 0}", }, + /* // TODO(tinygo): No function support {new(struct{ c func(chan *integer, *int8) }), "struct { c func(chan *reflect_test.integer, *int8) }{func(chan *reflect_test.integer, *int8)(0)}", }, + */ {new(struct { a int8 b int32 @@ -281,8 +286,6 @@ func testType(t *testing.T, i int, typ Type, want string) { } } -/* - func TestTypes(t *testing.T) { for i, tt := range typeTests { testType(t, i, ValueOf(tt.i).Field(0).Type(), tt.s) @@ -378,6 +381,8 @@ func TestSetValue(t *testing.T) { } } +/* + func TestMapIterSet(t *testing.T) { m := make(map[string]any, len(valueTests)) for _, tt := range valueTests { |