Skip to content

Commit 890297e

Browse files
committed
math: rename CheckPrime as Prime
1 parent 07c7ec2 commit 890297e

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

math/prime.jule

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
fn CheckPrime(n: int): bool {
1+
fn Prime(n: int): bool {
22
if n <= 1 {
33
return false
44
}

math/prime_test.jule

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
use "std/testing"
44

55
#test
6-
fn testCheckPrime(t: &testing::T) {
7-
t.Assert(!CheckPrime(-7), "-7 should not be prime")
8-
t.Assert(!CheckPrime(0), "0 should not be prime")
9-
t.Assert(!CheckPrime(1), "1 should not be prime")
10-
t.Assert(CheckPrime(2), "2 should be prime")
11-
t.Assert(CheckPrime(3), "3 should be prime")
12-
t.Assert(!CheckPrime(4), "4 should not be prime")
13-
t.Assert(CheckPrime(97), "97 should be prime")
14-
t.Assert(!CheckPrime(100), "100 should not be prime")
6+
fn testPrime(t: &testing::T) {
7+
t.Assert(!Prime(-7), "-7 should not be prime")
8+
t.Assert(!Prime(0), "0 should not be prime")
9+
t.Assert(!Prime(1), "1 should not be prime")
10+
t.Assert(Prime(2), "2 should be prime")
11+
t.Assert(Prime(3), "3 should be prime")
12+
t.Assert(!Prime(4), "4 should not be prime")
13+
t.Assert(Prime(97), "97 should be prime")
14+
t.Assert(!Prime(100), "100 should not be prime")
1515
}

0 commit comments

Comments
 (0)