internal/shader: add tests for arrays

This commit is contained in:
Hajime Hoshi 2024-09-21 21:43:08 +09:00
parent e6d4eac218
commit eabc697022
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,13 @@
void F0(void);
void F0(void) {
float l0[2];
l0[0] = float(0);
l0[1] = float(0);
float l1[2];
l1[0] = float(0);
l1[1] = float(0);
(l0)[0] = 1.0;
l1[0] = l0[0];
l1[1] = l0[1];
}

7
internal/shader/testdata/array3.go vendored Normal file
View File

@ -0,0 +1,7 @@
package main
func Foo() {
a := [2]float{1}
_ = a
return
}