harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 578149d3827f8f4077815af832f2ef6f5547ca28
parent 6e99b03605977e9b357315de51894fb1d42a995c
Author: Eyal Sawady <ecs@d2evs.net>
Date:   Sat,  2 Jan 2021 15:25:20 -0500

Update string test for implicit dereferencing

Diffstat:
Mtests/04-strings.ha | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tests/04-strings.ha b/tests/04-strings.ha @@ -10,13 +10,12 @@ fn charptr() void = { let x = "Hello!"; let y = x: *const char; let z = y: *[*]u8; - // XXX: Update me when implicit deref is implemented - assert((*z)[0] == 'H': u32: u8); - assert((*z)[1] == 'e': u32: u8); - assert((*z)[2] == 'l': u32: u8); - assert((*z)[3] == 'l': u32: u8); - assert((*z)[4] == 'o': u32: u8); - assert((*z)[5] == '!': u32: u8); + assert(z[0] == 'H': u32: u8); + assert(z[1] == 'e': u32: u8); + assert(z[2] == 'l': u32: u8); + assert(z[3] == 'l': u32: u8); + assert(z[4] == 'o': u32: u8); + assert(z[5] == '!': u32: u8); }; export fn main() void = {