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

add docstrings compiler tests #7184

Draft
wants to merge 54 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
02f60b8
add docstrings tests
aspeddro Dec 1, 2024
02f4467
remove prepareCompiler
aspeddro Dec 1, 2024
319ff9b
update output
aspeddro Dec 1, 2024
d5ce578
add node runtime tests
aspeddro Dec 3, 2024
dd04fec
add more docstrings
aspeddro Dec 5, 2024
18c055b
Merge branch 'master' into test-docstrings-examples
aspeddro Dec 5, 2024
61550e8
update analysis_tests
aspeddro Dec 5, 2024
f0c3682
test script: use path.join
aspeddro Dec 5, 2024
f9bba99
revert changes in Js_{dict,types}.resi
aspeddro Dec 5, 2024
bf58e7a
use double quotes
aspeddro Dec 5, 2024
b6a9672
update analysis_tests
aspeddro Dec 5, 2024
c697b4a
Merge branch 'master' into test-docstrings-examples
aspeddro Dec 5, 2024
56d9eaa
fix Nullable.getExn
aspeddro Dec 5, 2024
a6a3149
rename project name
aspeddro Dec 7, 2024
7c95492
Merge branch 'master' into test-docstrings-examples
aspeddro Dec 7, 2024
a18e604
ignore windows
aspeddro Dec 7, 2024
63e0ea2
fix tests for Belt modules
aspeddro Dec 7, 2024
2e3b448
initial
aspeddro Dec 8, 2024
90cde20
fix tests
aspeddro Dec 8, 2024
eb83930
cleanup
aspeddro Dec 8, 2024
4b64114
use on method
aspeddro Dec 8, 2024
87605d6
format code
aspeddro Dec 8, 2024
46a5d3c
test: increase file descriptor limit
aspeddro Dec 8, 2024
945e168
debug
aspeddro Dec 8, 2024
268c521
increase max user proc
aspeddro Dec 8, 2024
16cf8df
tests only on linux
aspeddro Dec 8, 2024
eef0be6
new cache
aspeddro Dec 8, 2024
21f88c1
back to v5 cache
aspeddro Dec 8, 2024
4ebbd22
Merge branch 'master' into test-docstrings-examples
aspeddro Dec 15, 2024
94a1fdd
test on macos
aspeddro Dec 15, 2024
3ceeb22
use bsc eval
aspeddro Dec 15, 2024
1c11770
rename to assertEqual
aspeddro Dec 16, 2024
01dfa5a
process in batches
aspeddro Dec 16, 2024
500e714
update tests
aspeddro Dec 16, 2024
e52e390
process bsc in batches
aspeddro Dec 17, 2024
7a3ad03
test AsyncIterator
aspeddro Dec 17, 2024
06090db
fix test
aspeddro Dec 17, 2024
530d74d
format
aspeddro Dec 17, 2024
d9953ac
increase batchsize
aspeddro Dec 17, 2024
d99c805
reduce batchsize
aspeddro Dec 17, 2024
c2e40c0
increase macos file descriptors
aspeddro Dec 17, 2024
bb28471
fix
aspeddro Dec 17, 2024
75008a4
add debug msg
aspeddro Dec 17, 2024
70ef72e
[skip ci]
aspeddro Dec 18, 2024
e482294
test single file
aspeddro Dec 21, 2024
42015be
test time to compile examples
aspeddro Dec 21, 2024
7ea662f
add log
aspeddro Dec 21, 2024
f35f121
test changes in SpawnAsync.run
aspeddro Dec 21, 2024
72846f8
Merge branch 'master' into test-docstrings-examples
aspeddro Dec 21, 2024
e8c84e3
update analysis_tests
aspeddro Dec 21, 2024
6c4b076
increase macos limit on build compiler
aspeddro Dec 21, 2024
7f459e3
add log
aspeddro Dec 21, 2024
bb76049
increase macos limit and print chuncks total
aspeddro Dec 22, 2024
6c21cdd
run tests from ci.yml
aspeddro Dec 22, 2024
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
Prev Previous commit
Next Next commit
fix Nullable.getExn
aspeddro committed Dec 5, 2024

Verified

This commit was signed with the committer’s verified signature.
aspeddro Pedro Castro
commit 56d9eaae09b91413bfeb154f055738bcabdf8d31
9 changes: 4 additions & 5 deletions runtime/Nullable.resi
Original file line number Diff line number Diff line change
@@ -147,11 +147,10 @@ switch Nullable.getExn(%raw("null")) {
| _ => assert(false)
}

// TODO(aspeddro): This example dont pass
// switch Nullable.getExn(%raw("undefined")) {
// | exception Invalid_argument(_) => assert(true)
// | _ => assert(false)
// }
switch Nullable.getExn(%raw("undefined")) {
| exception Invalid_argument(_) => assert(true)
| _ => assert(false)
}
```

## Exceptions
26 changes: 14 additions & 12 deletions tests/docstrings_examples/DocTest.res.mjs
Original file line number Diff line number Diff line change
@@ -130,18 +130,20 @@ async function runtimeTests(code) {
let stdout = match.stdout;
let std;
let exit = 0;
if (exitCode == null) {
exit = 1;
} else if (exitCode === 0.0 && stderr.length > 0) {
std = {
TAG: "Ok",
_0: stderr
};
} else if (exitCode === 0.0) {
std = {
TAG: "Ok",
_0: stdout
};
if (exitCode !== null) {
if (exitCode === 0.0 && stderr.length > 0) {
std = {
TAG: "Ok",
_0: stderr
};
} else if (exitCode === 0.0) {
std = {
TAG: "Ok",
_0: stdout
};
} else {
exit = 1;
}
} else {
exit = 1;
}