-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
packages/squiggle-lang/__tests__/library/distOperations_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { testEvalToBe } from "../helpers/reducerHelpers.js"; | ||
|
||
// TODO - it'd be useful to do most of `./sym_test.ts` tests here, without `Sym.` prefix | ||
describe("Dist operations", () => { | ||
describe("Power on negative samples", () => { | ||
// ok when power is integer | ||
testEvalToBe("normal(-100, 1) ^ 2", "Sample Set Distribution"); | ||
// fails when power is not an integer | ||
testEvalToBe( | ||
"normal(-100, 1) ^ 2.5", | ||
"Error(Distribution Math Error: Operation returned complex result)" | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters