Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop a unit testing system #378

Merged
merged 10 commits into from
Nov 17, 2022
Merged

Conversation

gfngfn
Copy link
Owner

@gfngfn gfngfn commented Nov 15, 2022

Config files:

 language: "0.1.0"
 contents:
   type: "library"
   …
+  test_directories:
+  - "./test"

(Black-box) tests:

module CalcTest = struct

  #[test]
  val add_test =
    let expected = 99 in
    let got = Calc.add 42 57 in
    if got == expected then
      ()
    else
      abort-with-message (`expected: `# ^ (arabic expected) ^ `, got: `# ^ (arabic got))

end

How to run tests:

$ satysfi test dir/of/your-package

@gfngfn gfngfn changed the title [WIP] Develop a unit testing system Develop a unit testing system Nov 16, 2022
@gfngfn gfngfn marked this pull request as ready for review November 16, 2022 21:18
@gfngfn gfngfn merged commit 71f20d1 into dev-0-1-0-package-system Nov 17, 2022
@gfngfn gfngfn deleted the dev-0-1-0-test-system branch April 7, 2024 17:46
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.

1 participant