Skip to content

Commit

Permalink
test: fix brace expansion test not checking invalid inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Jan 18, 2018
1 parent a4e8e55 commit 0aae96b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/standalone/brace_expansion/main.zig
Expand Up @@ -135,9 +135,7 @@ fn expandString(input: []const u8, output: &Buffer) -> %void {
}
}

const ListOfBuffer0 = ArrayList(Buffer); // TODO this is working around a compiler bug, fix and delete this

fn expandNode(node: &const Node, output: &ListOfBuffer0) -> %void {
fn expandNode(node: &const Node, output: &ArrayList(Buffer)) -> %void {
assert(output.len == 0);
switch (*node) {
Node.Scalar => |scalar| {
Expand Down Expand Up @@ -214,7 +212,7 @@ fn expectError(test_input: []const u8, expected_err: error) {
var output_buf = Buffer.initSize(global_allocator, 0) catch unreachable;
defer output_buf.deinit();

if (expandString("}ABC", &output_buf)) {
if (expandString(test_input, &output_buf)) {
unreachable;
} else |err| {
assert(expected_err == err);
Expand Down

0 comments on commit 0aae96b

Please sign in to comment.