|
| 1 | +// Generated by ReScript, PLEASE EDIT WITH CARE |
| 2 | + |
| 3 | +import * as Test from "./Test.mjs"; |
| 4 | +import * as Caml_obj from "rescript/lib/es6/caml_obj.js"; |
| 5 | +import * as Core__Option from "../src/Core__Option.mjs"; |
| 6 | + |
| 7 | +var eq = Caml_obj.equal; |
| 8 | + |
| 9 | +function isPositive(i) { |
| 10 | + return i > 0; |
| 11 | +} |
| 12 | + |
| 13 | +Test.run([ |
| 14 | + [ |
| 15 | + "OptionTests.res", |
| 16 | + 12, |
| 17 | + 13, |
| 18 | + 47 |
| 19 | + ], |
| 20 | + "isSomeAnd: if None, return false" |
| 21 | + ], Core__Option.isSomeAnd(undefined, isPositive), eq, false); |
| 22 | + |
| 23 | +Test.run([ |
| 24 | + [ |
| 25 | + "OptionTests.res", |
| 26 | + 19, |
| 27 | + 13, |
| 28 | + 55 |
| 29 | + ], |
| 30 | + "isSomeAnd: if Some and true, return true" |
| 31 | + ], Core__Option.isSomeAnd(1, isPositive), eq, true); |
| 32 | + |
| 33 | +Test.run([ |
| 34 | + [ |
| 35 | + "OptionTests.res", |
| 36 | + 25, |
| 37 | + 13, |
| 38 | + 57 |
| 39 | + ], |
| 40 | + "isSomeAnd: if Some and false, return false" |
| 41 | + ], Core__Option.isSomeAnd(-1, isPositive), eq, false); |
| 42 | + |
| 43 | +Test.run([ |
| 44 | + [ |
| 45 | + "OptionTests.res", |
| 46 | + 31, |
| 47 | + 20, |
| 48 | + 52 |
| 49 | + ], |
| 50 | + "isNoneOr: if None, return true" |
| 51 | + ], Core__Option.isNoneOr(undefined, isPositive), eq, true); |
| 52 | + |
| 53 | +Test.run([ |
| 54 | + [ |
| 55 | + "OptionTests.res", |
| 56 | + 33, |
| 57 | + 13, |
| 58 | + 54 |
| 59 | + ], |
| 60 | + "isNoneOr: if Some and true, return true" |
| 61 | + ], Core__Option.isNoneOr(1, isPositive), eq, true); |
| 62 | + |
| 63 | +Test.run([ |
| 64 | + [ |
| 65 | + "OptionTests.res", |
| 66 | + 39, |
| 67 | + 13, |
| 68 | + 56 |
| 69 | + ], |
| 70 | + "isNoneOr: if Some and false, return false" |
| 71 | + ], Core__Option.isNoneOr(-1, isPositive), eq, false); |
| 72 | + |
| 73 | +export { |
| 74 | + eq , |
| 75 | + isPositive , |
| 76 | +} |
| 77 | +/* Not a pure module */ |
0 commit comments