-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update quality.sh and Creature.ts files (#308)
Co-authored-by: Nigel Leck <[email protected]>
- Loading branch information
Showing
5 changed files
with
92 additions
and
53 deletions.
There are no files selected for viewing
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
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
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
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 |
---|---|---|
@@ -1,20 +1,15 @@ | ||
import { fail } from "https://deno.land/[email protected]/assert/fail.ts"; | ||
import { Activations } from "../src/methods/activations/Activations.ts"; | ||
import { assertNotEquals } from "https://deno.land/[email protected]/assert/assert_not_equals.ts"; | ||
import { assert } from "https://deno.land/[email protected]/assert/assert.ts"; | ||
|
||
Deno.test("ActivationNames", () => { | ||
Activations.NAMES.forEach((name) => { | ||
const activation = Activations.find(name); | ||
if (!activation) { | ||
throw new Error(`Could not find activation for ${name}`); | ||
} | ||
|
||
if (name == "INVERSE") { | ||
fail("INVERSE is not a valid activation"); | ||
} | ||
assert(activation !== undefined, `Could not find activation for ${name}`); | ||
assertNotEquals(name, "INVERSE", "INVERSE is not a valid activation"); | ||
}); | ||
|
||
const inverse = Activations.find("INVERSE"); | ||
if (!inverse) { | ||
throw new Error(`Could not find activation for INVERSE`); | ||
} | ||
assert(inverse !== undefined, `Could not find activation for INVERSE`); | ||
}); |
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