aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
AgeCommit message (Collapse)Author
2024-05-14reflect: use int in StringHeader and SliceHeader on non-AVR platforms (#4156)Randy Reddig
2022-12-19build: drop deprecated build tagsYurii Soldak
2022-11-21Fix panic when size 0 passed to mallocAnuraag Agrawal
2022-09-15wasm,wasi: make sure buffers returned by malloc are not freed until f… (#3148)Anuraag Agrawal
* wasm,wasi: make sure buffers returned by malloc are not freed until free is called
2022-08-30all: drop support for Go 1.16 and Go 1.17Ayke van Laethem
2022-07-05tests/runtime: add benchmarks for runtime memhashDamian Gryski
2022-06-11smoketest: add regression test for 'tinygo test ./...', see #2892Dan Kegel
tests/testing/recurse has two directories with tests; "make smoketest" now does "tinygo test ./..." in that directory and fails if it does not run both directories' tests.
2022-02-24test: Add text/template smoke testKyle Conroy
2022-01-21os: add stubs for Readlink and File.Seek for baremetal targets, with smoke test.Dan Kegel
Test currently enabled on pybadge (chosen at random) TODO: - enable test on arduino; currently fails with "interp: ptrtoint integer size..." (#2389) - enable test on nintendoswitch; currently fails with many missing definitions (#2530)
2022-01-18wasmtest: fix resource cleanup and add loggingNia Waldvogel
The chromedp context was not cancelled, so resources may have been leaking. Additionally this waits for the browser to start before the timer starts, and extends the timeout to 20 seconds. Logging from chromedp has also been enabled, which may help identify possible issues?
2022-01-03main (test): add tests to `tinygo test`Nia Waldvogel
2021-11-21tests: improve wasm tests slightlyAyke van Laethem
These wasm tests weren't passing in GitHub Actions and also weren't passing on my laptop. I'm not sure why, I think there are a few race conditions that are going on. This commit attempts to fix this at least to a degree: - The context deadline is increased from 5 seconds to 10 seconds. - The tests are not running in parallel anymore. - Some `Sleep` calls were removed, they do not appear to be necessary (and if they were, sleeping is the wrong solution to solve race conditions). Overall the tests are taking a few seconds more, but on the other hand they seem to be passing more reliable. At least for me, on my laptop (and hopefully also in CI).
2021-11-14internal/task: use asyncify on webassemblyNia Waldvogel
This change implements a new "scheduler" for WebAssembly using binaryen's asyncify transform. This is more reliable than the current "coroutines" transform, and works with non-Go code in the call stack. runtime (js/wasm): handle scheduler nesting If WASM calls into JS which calls back into WASM, it is possible for the scheduler to nest. The event from the callback must be handled immediately, so the task cannot simply be deferred to the outer scheduler. This creates a minimal scheduler loop which is used to handle such nesting.
2021-08-16all: use new testing features of Go 1.14 and 1.15Ayke van Laethem
This simplifies the tests a bit.
2021-08-16ci: drop support for Go 1.13 and 1.14Ayke van Laethem
They aren't supported anymore in CI, and because untested code is broken code, let's remove support for these Go versions altogether.
2021-08-12testing: test testing package using `tinygo test`Ayke van Laethem
2021-08-06src/testing/benchmark.go: add subset implementation of BenchmarkDan Kegel
Partially fixes #1808 Allows the following to succeed: curl "https://golang.org/test/fibo.go?m=text" > fibo.go tinygo build -o fibo fibo.go ./fibo -bench
2021-01-25Use httptest to serve wasm test files.Elliott Sales de Andrade
This picks a port automatically, so avoids any conflicts that might arise from running the tests in parallel.
2021-01-24Update to current chromedp.Elliott Sales de Andrade
2020-05-27added test for wasm log outputBrad Peabody
callback case for log test
2020-05-23wasm test suite (#1116)Brad Peabody
* wasm: add test suite using headlless chrome
2019-08-13Add common test logging methods such as Errorf/Fatalf/PrintfBrad Erickson
Implements nearly all of the test logging methods for both T and B structs. Majority of the code has been copied from: golang.org/src/testing/testing.go then updated to match the existing testing.go structure. Code structure/function/method order mimics upstream. Both FailNow() and SkipNow() cannot be completely implemented, because they require an early exit from the goroutine. Instead, they call Error() to report the limitation. This incomplete implementation allows more detailed test logging and increases compatiblity with upstream.
2019-08-11testing: Add Benchmark B struct stubBrad Erickson
This struct allows test files containing basic benchmarks to compile and run, but will not run the benchmarks themselves. For #491
2019-06-18Add test command to tinygo (#243)Carolyn Van Slyck
* Add test command to tinygo