Skip to content

Commit

Permalink
internal/shader: add tests
Browse files Browse the repository at this point in the history
Updates #2712
  • Loading branch information
hajimehoshi committed Jul 27, 2023
1 parent 692d119 commit 900b687
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/shader/syntax_test.go
Expand Up @@ -3376,6 +3376,8 @@ func TestSyntaxCast(t *testing.T) {
{stmt: "a := int(1); _ = a", err: false},
{stmt: "a := int(1.0); _ = a", err: false},
{stmt: "a := int(1.1); _ = a", err: true},
{stmt: "const c = 1.1; a := int(c); _ = a", err: true},
{stmt: "const c float = 1.1; a := int(c); _ = a", err: true},
{stmt: "a := float(1); _ = a", err: false},
{stmt: "a := float(1.0); _ = a", err: false},
{stmt: "a := float(1.1); _ = a", err: false},
Expand Down

0 comments on commit 900b687

Please sign in to comment.