mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 07:53:40 +00:00
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:
committed by
Ron Evans
parent
7b7601d77c
commit
c383a407e3
Vendored
+5
@@ -1,3 +1,4 @@
|
||||
#include <math.h>
|
||||
#include "main.h"
|
||||
|
||||
int global = 3;
|
||||
@@ -67,3 +68,7 @@ void unionSetData(short f0, short f1, short f2) {
|
||||
void arraydecay(int buf1[5], int buf2[3][8], int buf3[4][7][2]) {
|
||||
// Do nothing.
|
||||
}
|
||||
|
||||
double doSqrt(double x) {
|
||||
return sqrt(x);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user