syntax.assertion_form
Assertion written in another language's form.
Area 13, Testing; not declinable; the next step is usually the agent's.
A test checks with assert condition: Rust's assert_eq!, JUnit's assertEquals, Python's assertEqual, Jest's expect(...).toBe(...) and Node's assert.equal are habits from other languages, one error each whose edit writes the assert.
type Count = Int { min: 0}function same(count: Count) -> Count { return count}test "same gives back its count" { assert_eq!(same(2), 2)}
error Jadpo writes assert same(2) == 2, not assert_eq!(same(2), 2)
--> main.jadpo:10:5
|10 | assert_eq!(same(2), 2) | ^^^^^^^^^^^^^^^^^^^^^^ write `assert same(2) == 2`
- reason
assert_eq!checks a test's values in Rust,assertEqualsin JUnit,assertEqualin Python's unittest,expect(…).toBe(…)in Jest andassert.equalin Node; a Jadpo test checks withassert condition.- next
- Write
assert same(2) == 2(agent) - rule
- syntax.
assertion_ form - help
- https://jadpo.
dev/docs/errors/syntax. assertion_ form
Markdown for agents: /docs/errors/syntax.assertion_form.md.Built from Jadpo main at aee2e8f.