Skip to content

Commit e5335dc

Browse files
committed
remove logs
1 parent 7a6e369 commit e5335dc

File tree

2 files changed

+5
-29
lines changed

2 files changed

+5
-29
lines changed

tests/docstrings_examples/DocTest.res

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ type example = {
125125
let createFileInTempDir = id => Path.join2(OS.tmpdir(), id)
126126

127127
let compileTest = async (~id, ~code) => {
128-
let {stderr, stdout, code, signal} = await SpawnAsync.run(
128+
let {stderr, stdout, code} = await SpawnAsync.run(
129129
~command=bscBin,
130130
// NOTE: warnings argument (-w) should be before eval (-e) argument
131131
~args=["-w", "-3-109-44", "-e", code],
@@ -137,18 +137,6 @@ let compileTest = async (~id, ~code) => {
137137
| _ => ()
138138
}
139139

140-
Console.log({
141-
"id": id,
142-
"code": code,
143-
"signal": signal,
144-
"stderr": stderr
145-
->Array.map(e => e->Buffer.toString)
146-
->Array.join(""),
147-
"stdout": stdout
148-
->Array.map(e => e->Buffer.toString)
149-
->Array.join(""),
150-
})
151-
152140
switch Array.length(stderr) > 0 {
153141
| true =>
154142
stderr
@@ -181,8 +169,6 @@ let runtimeTests = async code => {
181169
| None | Some(_) => Error(Array.length(stderr) > 0 ? stderr : stdout)
182170
}
183171

184-
Console.log({"code": code, "exitCode": exitCode})
185-
186172
switch std {
187173
| Ok(buf) =>
188174
buf
@@ -407,6 +393,7 @@ let main = async () => {
407393
switch value {
408394
| Some(index) =>
409395
let c = Array.getUnsafe(chuncks, index)
396+
Console.log2(index, Array.length(chuncks))
410397
let a =
411398
await c
412399
->Array.map(async example => {

tests/docstrings_examples/DocTest.res.mjs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ async function compileTest(id, code) {
104104
], undefined);
105105
let code$1 = match.code;
106106
let stderr = match.stderr;
107-
let stdout = match.stdout;
108107
if (code$1 !== null) {
109108
if (code$1 !== 0.0) {
110109
Pervasives.panic(id);
@@ -113,13 +112,6 @@ async function compileTest(id, code) {
113112
} else {
114113
Pervasives.panic(id + " exit code is None");
115114
}
116-
console.log({
117-
id: id,
118-
code: code$1,
119-
signal: match.signal,
120-
stderr: stderr.map(e => e.toString()).join(""),
121-
stdout: stdout.map(e => e.toString()).join("")
122-
});
123115
if (stderr.length > 0) {
124116
return {
125117
TAG: "Error",
@@ -128,7 +120,7 @@ async function compileTest(id, code) {
128120
} else {
129121
return {
130122
TAG: "Ok",
131-
_0: stdout.map(e => e.toString()).join("")
123+
_0: match.stdout.map(e => e.toString()).join("")
132124
};
133125
}
134126
}
@@ -171,10 +163,6 @@ async function runtimeTests(code) {
171163
_0: stderr.length > 0 ? stderr : stdout
172164
};
173165
}
174-
console.log({
175-
code: code,
176-
exitCode: exitCode
177-
});
178166
if (std.TAG === "Ok") {
179167
return {
180168
TAG: "Ok",
@@ -211,7 +199,7 @@ function extractDocFromFile(file) {
211199
RE_EXN_ID: "Assert_failure",
212200
_1: [
213201
"DocTest.res",
214-
225,
202+
211,
215203
9
216204
],
217205
Error: new Error()
@@ -414,6 +402,7 @@ async function main() {
414402
$$break = match.done;
415403
if (value !== undefined) {
416404
let c = chuncks[value];
405+
console.log(value, chuncks.length);
417406
let a = await Promise.all(c.map(async example => {
418407
let id = example.id.replaceAll(".", "__");
419408
let rescriptCode = getCodeBlocks(example);

0 commit comments

Comments
 (0)