runtime: fix UTF-8 decoding

The algorithm now checks for invalid UTF-8 sequences, which is required
by the Go spec.

This gets the tests of the unicode/utf8 package to pass.

Also add bytes.Equal for Go 1.11, which again is necessary for the
unicode/utf8 package.
This commit is contained in:
Ayke van Laethem
2020-09-17 22:45:51 +02:00
committed by Ron Evans
parent 41afb77080
commit ec54e7763d
3 changed files with 42 additions and 9 deletions
+1
View File
@@ -198,6 +198,7 @@ tinygo-test:
$(TINYGO) test container/list
$(TINYGO) test container/ring
$(TINYGO) test text/scanner
$(TINYGO) test unicode/utf8
.PHONY: smoketest
smoketest: