Damian Gryski
5faff2e13a
reflect: add sipmlified strconv.Quote() implementation for struct tags
2023-03-30 21:10:54 +02:00
Damian Gryski
195de23d3b
reflect: Fix Kind(-1).String() and enable test
2023-03-30 21:10:54 +02:00
Damian Gryski
d4bdd836bc
reflect: implement and test Value.Comparable
2023-03-30 21:10:54 +02:00
Damian Gryski
a11f2436e3
reflect: TestAliasNames passes
2023-03-30 21:10:54 +02:00
Damian Gryski
181d2ad2b4
reflect: add CanInt() and friends and uncomments tests that pass
2023-03-30 21:10:54 +02:00
Damian Gryski
53b95cad08
reflect: uncomment Type.String() tests that pass
2023-03-30 21:10:54 +02:00
Damian Gryski
3612b7749e
reflect: uncomment all(?) the tests that pass
2023-03-25 13:57:00 +01:00
Damian Gryski
688a5dbf8d
reflct: reenable DeepEqual tests
2023-03-25 13:57:00 +01:00
Damian Gryski
35dcf135c0
reflect: comment out all tests but keep imports
2023-03-25 13:57:00 +01:00
Damian Gryski
c482d65397
reflect: replace all_test with copy from upstream
2023-03-25 13:57:00 +01:00
Damian Gryski
1cce1ea423
reflect: uncomment some DeepEqual tests that now pass
2023-02-28 13:10:40 -08:00
Julia Ogris
c759e6fc2d
reflect: Add Value.IsZero() method
...
Add Value.IsZero() with tests, largely copied from the Go source code.
The tests were altered to remove the parts calling `Zero()` as that is
still unimplemented in tinygo, and to remove a test that tries to catch
a panic which is not supported on wasi.
A new case for `UnsafePointer` in `Value.IsNil()` was required for
unsafe.Pointer tests to pass.
Link: https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/reflect/value.go;l=1568
Link: https://cs.opensource.google/go/go/+/refs/tags/go1.19.3:src/reflect/all_test.go;l=1322
Co-authored-by: Cam Hutchison <camh@xdna.net>
2022-11-21 14:51:22 +01:00
Damian Gryski
ae1e7731a4
src/reflect: comment out a now-failing test
...
Keys() is unimplemented, which is required to compare
these two maps.
2021-12-18 10:02:36 +01:00
Ayke van Laethem
335fb71d2f
reflect: add support for DeepEqual
...
The implementation has been mostly copied from the Go reference
implementation with some small changes to fit TinyGo.
Source: 77a11c05d6/src/reflect/deepequal.go
In addition, this commit also contains the following:
- A set of tests copied from the Go reflect package.
- An increased stack size for the riscv-qemu and hifive1-qemu targets
(because they otherwise fail to run the tests). Because these
targets are only used for testing, this seems fine to me.
2021-11-12 21:27:27 +01:00