aboutsummaryrefslogtreecommitdiff
path: root/tests/issues/test_issue_829.odin
blob: 229d8e9b42d319bcfea51e792303c58256c7f33d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Tests issue #829 https://github.com/odin-lang/Odin/issues/829
package test_issues

import "core:testing"

/* Original issue #829 example */
env : map[string]proc(a, b : int) -> int = {
	"+" = proc(a, b : int) -> int {
		return a + b
	},
}

@(test)
test_orig_ret :: proc(t: ^testing.T) {
	r := env["+"](1, 2)
	testing.expectf(t, r == 3, "%q != 3", r)
}