Skip to content

Add test cases from codex#114

Open
arthurvergacas wants to merge 19 commits into
developfrom
add-test-cases-from-codex
Open

Add test cases from codex#114
arthurvergacas wants to merge 19 commits into
developfrom
add-test-cases-from-codex

Conversation

@arthurvergacas

Copy link
Copy Markdown
Collaborator

No description provided.

@Grillo-0 Grillo-0 linked an issue Apr 25, 2026 that may be closed by this pull request
@arthurvergacas arthurvergacas force-pushed the add-test-cases-from-codex branch 3 times, most recently from f1e6c97 to 549899f Compare April 29, 2026 14:08
@arthurvergacas arthurvergacas marked this pull request as ready for review April 29, 2026 14:13
@arthurvergacas arthurvergacas requested a review from Grillo-0 April 29, 2026 14:13
@Grillo-0 Grillo-0 changed the base branch from develop to vunit-todo-support May 1, 2026 18:24
Base automatically changed from vunit-todo-support to develop May 3, 2026 18:06
@Grillo-0 Grillo-0 force-pushed the add-test-cases-from-codex branch from 549899f to 44f5b6b Compare May 5, 2026 22:10
@arthurvergacas arthurvergacas force-pushed the add-test-cases-from-codex branch 2 times, most recently from 478f950 to cf06945 Compare May 17, 2026 19:14
Comment thread subprojects/vinumc/tests/test_helpers.c
struct compiler_ctx comp = compiler_ctx_init(&ctx->allocator);

va_list ap;
va_start(ap, prg_cstr);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for this fancy var args, just let the user pass the vec of libraries

@arthurvergacas arthurvergacas May 21, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i used this pattern because it was also used in vunit_run_vinumc_ok

should we change vunit_run_vinumc_ok as well??

void vunit_run_vinumc_ok(struct vunit_test_ctx *ctx, char *input, char **output, ...) {
char *err = NULL;
va_list ap;
va_start(ap, output);
int ret = vunit_run_vinumcv(ctx, input, output, &err, ap);
va_end(ap);
if (strlen(err) != 0) {
fprintf(stderr, "PROGRAM STDERR:\n%s\n", err);
}
VUNIT_ASSERT_EQ(ctx, ret, 0);
VUNIT_ASSERT_EQ(ctx, strlen(err), 0);
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we agreed to use a vec and instad create a helper function inside vec that receives the varargs.

We will take another look

@arthurvergacas arthurvergacas force-pushed the add-test-cases-from-codex branch 3 times, most recently from a37abe4 to 6d5df09 Compare May 21, 2026 11:03
@Grillo-0 Grillo-0 self-assigned this Jun 11, 2026
@Grillo-0 Grillo-0 force-pushed the add-test-cases-from-codex branch 7 times, most recently from fdd3b77 to 7febf6f Compare June 16, 2026 23:44
@Grillo-0 Grillo-0 requested review from JeanJPNM and artP2 June 16, 2026 23:48
@Grillo-0 Grillo-0 force-pushed the add-test-cases-from-codex branch from 7febf6f to 07d0a08 Compare June 18, 2026 11:55

@JeanJPNM JeanJPNM left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The compiler doesn't support top level text, requiring it to be wrapped inside a declaration first, (look at #48, #55 and #61).

Comment on lines +27 to +39
struct vunit_test tests[] = {
{ .name = "Blank reduction collapses newlines into one space",
.test_func = test_blank_reduction_across_newline,
.todo = true,
.todo_msg = "blank reduction across newlines not implemented" },
{ .name = "Leading and trailing blanks are suppressed",
.test_func = test_leading_trailing_blanks_suppressed,
.todo = true,
.todo_msg = "leading/trailing blank suppression not implemented" },
{ .name = "Blanks around symbol field are ignored",
.test_func = test_symbol_field_blanks_ignored },
{},
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank reduction features, these features are already implemented, however the vinum compiler does not support top-level text (issue #48, fixed by #55, reverted for some reason I don't remember in #61) requiring these tests to be wrapped in a parent block to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create tests for all the codex spec

3 participants