Skip to content

Commit

Permalink
fix(examples:constRefs)
Browse files Browse the repository at this point in the history
  • Loading branch information
emil14 committed Apr 29, 2024
1 parent 75407f6 commit 35ee82e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 4 additions & 1 deletion examples/const_refs/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"github.com/stretchr/testify/require"
)

// Nested map has only one key because keys are unordered
// so having order in test will make it flacky.
func Test(t *testing.T) {
err := os.Chdir("..")
require.NoError(t, err)
Expand All @@ -22,7 +24,8 @@ func Test(t *testing.T) {
require.NoError(t, err)
require.Equal(
t,
"map[l:[1 2 3] m:map[one:1 three:3 two:2]]\n",
`{"l": [1, 2, 3], "m": {"key": 1}}
`,
string(out),
)

Expand Down
6 changes: 1 addition & 5 deletions examples/const_refs/main.neva
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ const {
two int = 2
three int = 3
numsList list<int> = [one, two, three]
numsMap map<int> = {
one: one,
two: two,
three: three
}
numsMap map<int> = { key: one }
numsStruct NumsStruct = {
l: numsList,
m: numsMap
Expand Down

0 comments on commit 35ee82e

Please sign in to comment.