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

Comment out all the tests from Core #779

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 32 additions & 32 deletions packages/Core/bool.candy
Original file line number Diff line number Diff line change
Expand Up @@ -50,35 +50,35 @@ implies a b :=
needs (is b)
a | not | or b

test =
[checkEquals] = use "..check"

checkEquals (is True) True
checkEquals (is False) True
checkEquals (is 3) False

checkEquals (not True) False
checkEquals (not False) True

## `lazyAnd` and `lazyOr` are automatically tested by the tests for the
## non-lazy variants.

checkEquals (True | and True) True
checkEquals (True | and False) False
checkEquals (False | and True) False
checkEquals (False | and False) False

checkEquals (True | or True) True
checkEquals (True | or False) True
checkEquals (False | or True) True
checkEquals (False | or False) False

checkEquals (True | xor True) False
checkEquals (True | xor False) True
checkEquals (False | xor True) True
checkEquals (False | xor False) False

checkEquals (True | implies True) True
checkEquals (True | implies False) False
checkEquals (False | implies True) True
checkEquals (False | implies False) True
#test =
# [checkEquals] = use "..check"
#
# checkEquals (is True) True
# checkEquals (is False) True
# checkEquals (is 3) False
#
# checkEquals (not True) False
# checkEquals (not False) True
#
# ## `lazyAnd` and `lazyOr` are automatically tested by the tests for the
# ## non-lazy variants.
#
# checkEquals (True | and True) True
# checkEquals (True | and False) False
# checkEquals (False | and True) False
# checkEquals (False | and False) False
#
# checkEquals (True | or True) True
# checkEquals (True | or False) True
# checkEquals (False | or True) True
# checkEquals (False | or False) False
#
# checkEquals (True | xor True) False
# checkEquals (True | xor False) True
# checkEquals (False | xor True) True
# checkEquals (False | xor False) False
#
# checkEquals (True | implies True) True
# checkEquals (True | implies False) False
# checkEquals (False | implies True) True
# checkEquals (False | implies False) True
16 changes: 8 additions & 8 deletions packages/Core/controlFlow.candy
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ repeat times body :=
}
}

test =
[checkEquals] = use "..check"

checkEquals (ifElse True { Then } { Else }) Then
checkEquals (ifElse False { Then } { Else }) Else

checkEquals (if True { Then }) Then
checkEquals (if False { Then }) Nothing
#test =
# [checkEquals] = use "..check"
#
# checkEquals (ifElse True { Then } { Else }) Then
# checkEquals (ifElse False { Then } { Else }) Else
#
# checkEquals (if True { Then }) Then
# checkEquals (if False { Then }) Nothing
72 changes: 36 additions & 36 deletions packages/Core/equality.candy
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,39 @@ builtins = use "Builtins"

equals := builtins.equals

test =
[checkEquals] = use "..check"

checkEquals (equals 2 Foo) False

## numbers
checkEquals (equals 5 5) True
checkEquals (equals 3 5) False

## text
checkEquals (equals "Hey" "Hey") True
checkEquals (equals "A" "B") False

## tags
checkEquals (equals Kiwi Kiwi) True
checkEquals (equals Kiwi Banana) False
checkEquals (equals Kiwi (Kiwi 3)) False
checkEquals (equals (Kiwi 3) (Kiwi 3)) True
checkEquals (equals (Kiwi 5) (Kiwi 3)) False

## functions
foo = { a -> 4 }
checkEquals (equals foo foo) True
## TODO: Currently, this is not implemented correctly in the VM.
# checkEquals (equals foo { a -> 4 }) False

## lists
checkEquals (equals (1, 2, 3) (1, 2, 3)) True
checkEquals (equals (1, 2, 3) (1, 2)) False
checkEquals (equals (1, 2, 3) (1, 2, 30)) False

## structs
checkEquals (equals [Foo: 2] [Foo: 2]) True
checkEquals (equals [Foo: 2] [Bar: 2]) False
checkEquals (equals [Foo: 2] []) False
checkEquals (equals [Foo: 2] [Foo: 3]) False
#test =
# [checkEquals] = use "..check"
#
# checkEquals (equals 2 Foo) False
#
# ## numbers
# checkEquals (equals 5 5) True
# checkEquals (equals 3 5) False
#
# ## text
# checkEquals (equals "Hey" "Hey") True
# checkEquals (equals "A" "B") False
#
# ## tags
# checkEquals (equals Kiwi Kiwi) True
# checkEquals (equals Kiwi Banana) False
# checkEquals (equals Kiwi (Kiwi 3)) False
# checkEquals (equals (Kiwi 3) (Kiwi 3)) True
# checkEquals (equals (Kiwi 5) (Kiwi 3)) False
#
# ## functions
# foo = { a -> 4 }
# checkEquals (equals foo foo) True
# ## TODO: Currently, this is not implemented correctly in the VM.
# # checkEquals (equals foo { a -> 4 }) False
#
# ## lists
# checkEquals (equals (1, 2, 3) (1, 2, 3)) True
# checkEquals (equals (1, 2, 3) (1, 2)) False
# checkEquals (equals (1, 2, 3) (1, 2, 30)) False
#
# ## structs
# checkEquals (equals [Foo: 2] [Foo: 2]) True
# checkEquals (equals [Foo: 2] [Bar: 2]) False
# checkEquals (equals [Foo: 2] []) False
# checkEquals (equals [Foo: 2] [Foo: 3]) False
26 changes: 13 additions & 13 deletions packages/Core/function.candy
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ doNotRun body :=
# errors.
needs (is0 body)

test =
[checkEquals] = use "..check"

checkEquals (is {}) True
checkEquals (is 4) False
checkEquals (getArgumentCount {}) 0
checkEquals (getArgumentCount { a -> }) 1

checkEquals (is0 {}) True
checkEquals (is0 { a -> }) False

checkEquals (run { 4 }) 4
checkEquals (doNotRun { 4 }) Nothing
#test =
# [checkEquals] = use "..check"
#
# checkEquals (is {}) True
# checkEquals (is 4) False
# checkEquals (getArgumentCount {}) 0
# checkEquals (getArgumentCount { a -> }) 1
#
# checkEquals (is0 {}) True
# checkEquals (is0 { a -> }) False
#
# checkEquals (run { 4 }) 4
# checkEquals (doNotRun { 4 }) Nothing
Loading
Loading