From: Carlos Maniero <carlos@maniero.me>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Carlos Maniero <carlos@maniero.me>
Subject: [PATCH olang 0/4] comment based integration tests
Date: Sun, 12 May 2024 11:30:29 -0300 [thread overview]
Message-ID: <20240512143033.229961-1-carlos@maniero.me> (raw)
The old munit based integration tests was replaced by a new mechanism
that makes testing more tasteful and easy to perform.
To create an integration tests you just need to create a olang file at
*tests/integration/tests* directory. The assertions are performed
thought a couple of comments.
# spec: some text to describe what are you testing
# compiler_exit: the compilers exit code
# compiler_output: the compilers output, %empty% for empty output
# program_exit: the program exit code
# ast: the ast output
# tokens: the tokens
This patchset also includes parser tests errors and creates a TODO
mechanism that can be used to track what need to be implemented.
Carlos Maniero (4):
tests: add comment based integration tests mechanism
tests: remove previous integration tests structure
tests: include integration tests for function parser errors
tests: print integration tests TODOs
Makefile | 1 -
tests/integration/Makefile | 33 +--
tests/integration/cli_runner.c | 100 ---------
tests/integration/cli_runner.h | 32 ---
tests/integration/cli_test.c | 132 ------------
tests/integration/proc_exec.c | 63 ------
tests/integration/proc_exec.h | 37 ----
tests/integration/test.sh | 195 ++++++++++++++++++
tests/integration/tests/0001_main_exit.ol | 27 +++
.../tests/0002_fn_without_fn_keyword.ol | 8 +
.../integration/tests/0003_fn_without_type.ol | 8 +
.../tests/0004_fn_without_type_colon.ol | 8 +
.../0005_fn_without_open_curly_brackets.ol | 8 +
.../0006_fn_without_close_curly_brackets.ol | 7 +
.../tests/0007_fn_without_return.ol | 8 +
15 files changed, 277 insertions(+), 390 deletions(-)
delete mode 100644 tests/integration/cli_runner.c
delete mode 100644 tests/integration/cli_runner.h
delete mode 100644 tests/integration/cli_test.c
delete mode 100644 tests/integration/proc_exec.c
delete mode 100644 tests/integration/proc_exec.h
create mode 100755 tests/integration/test.sh
create mode 100644 tests/integration/tests/0001_main_exit.ol
create mode 100644 tests/integration/tests/0002_fn_without_fn_keyword.ol
create mode 100644 tests/integration/tests/0003_fn_without_type.ol
create mode 100644 tests/integration/tests/0004_fn_without_type_colon.ol
create mode 100644 tests/integration/tests/0005_fn_without_open_curly_brackets.ol
create mode 100644 tests/integration/tests/0006_fn_without_close_curly_brackets.ol
create mode 100644 tests/integration/tests/0007_fn_without_return.ol
--
2.34.1
next reply other threads:[~2024-05-12 14:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-12 14:30 Carlos Maniero [this message]
2024-05-12 14:30 ` [PATCH olang 1/4] tests: add comment based integration tests mechanism Carlos Maniero
2024-05-12 14:30 ` [PATCH olang 2/4] tests: remove previous integration tests structure Carlos Maniero
2024-05-12 14:30 ` [PATCH olang 3/4] tests: include integration tests for function parser errors Carlos Maniero
2024-05-12 14:30 ` [PATCH olang 4/4] tests: print integration tests TODOs Carlos Maniero
2024-05-12 14:31 ` [olang/patches/.build.yml] build success builds.sr.ht
2024-08-09 19:42 ` [PATCH olang 0/4] comment based integration tests Johnny Richard
2024-08-21 15:58 ` Johnny Richard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240512143033.229961-1-carlos@maniero.me \
--to=carlos@maniero.me \
--cc=~johnnyrichard/olang-devel@lists.sr.ht \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.johnnyrichard.com/olang.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox