diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-05-26 23:31:38 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-05-27 00:54:14 -0400 |
| commit | 2dfb1ebee2bc215271e5416b723d746af319621b (patch) | |
| tree | 9b859eebd0926cb82c7370362baafec617e763dc /test/tests.zig | |
| parent | d6b01931ef8a04777ae198af323c2b6ba998f7b1 (diff) | |
| download | zig-2dfb1ebee2bc215271e5416b723d746af319621b.tar.gz zig-2dfb1ebee2bc215271e5416b723d746af319621b.zip | |
const global values can reference each other
Before, if you did something like:
```
const hi1 = "hi";
const hi2 = hi1;
```
This would create the "hi" data twice in the built object.
But since the value is const we don't have to duplicate the
data, now we take advantage of this fact.
closes #336
Diffstat (limited to 'test/tests.zig')
| -rw-r--r-- | test/tests.zig | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/tests.zig b/test/tests.zig index bdf2010fe7..35f06c1ec9 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -591,8 +591,7 @@ pub const CompileErrorContext = struct { tc.addSourceFile(".tmp_source.zig", source); comptime var arg_i = 0; inline while (arg_i < expected_lines.len) : (arg_i += 1) { - // TODO mem.dupe is because of issue #336 - tc.addExpectedError(%%mem.dupe(self.b.allocator, u8, expected_lines[arg_i])); + tc.addExpectedError(expected_lines[arg_i]); } return tc; } @@ -854,8 +853,7 @@ pub const ParseHContext = struct { tc.addSourceFile("source.h", source); comptime var arg_i = 0; inline while (arg_i < expected_lines.len) : (arg_i += 1) { - // TODO mem.dupe is because of issue #336 - tc.addExpectedError(%%mem.dupe(self.b.allocator, u8, expected_lines[arg_i])); + tc.addExpectedError(expected_lines[arg_i]); } return tc; } |
