mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
tests: fix failed consts test (it now works properly)
This commit is contained in:
parent
241a7b760d
commit
8ea576783b
@ -1,17 +1,21 @@
|
|||||||
pub const (
|
pub const (
|
||||||
a = b
|
a = b
|
||||||
c = a + b
|
ccc = a + b
|
||||||
b = 1
|
b = 1
|
||||||
d = (e / 2) + 7
|
d = (e / 2) + 7
|
||||||
e = 9
|
e = 9
|
||||||
)
|
)
|
||||||
|
|
||||||
pub const x = 10
|
pub const x = 10
|
||||||
|
|
||||||
fn test_const() {
|
fn test_const() {
|
||||||
assert a == 1
|
|
||||||
assert d == 11
|
assert d == 11
|
||||||
assert c == 1
|
//
|
||||||
|
assert b == 1
|
||||||
|
assert a == 1
|
||||||
|
assert ccc == a + b
|
||||||
|
assert e == 9
|
||||||
|
assert d == (e / 2) + 7
|
||||||
}
|
}
|
||||||
|
|
||||||
// const optional test
|
// const optional test
|
||||||
|
Loading…
Reference in New Issue
Block a user