cgo: do a basic test that math functions work

They should, but we weren't testing this.
I discovered this while working on
https://github.com/tinygo-org/macos-minimal-sdk/pull/4 which will likely
make math.h not work anymore. So I wanted to make sure we have a test in
place before we update that dependency.
This commit is contained in:
Ayke van Laethem
2024-03-03 20:53:45 +01:00
committed by Ron Evans
parent 7b7601d77c
commit c383a407e3
4 changed files with 14 additions and 0 deletions
+2
View File
@@ -74,4 +74,6 @@ C.GoString(nil):
len(C.GoStringN(nil, 0)): 0
len(C.GoBytes(nil, 0)): 0
copied string: foobar
CGo sqrt(3): +1.732051e+000
C sqrt(3): +1.732051e+000
line written using C puts