Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenVoich committed Oct 26, 2023
1 parent 58ba7cc commit c2216f6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mops.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "test"
version = "1.0.1"
description = "Motoko testing library to run tests with mops"
repository = "https://github.com/ZenVoich/test"
keywords = [ "test", "mops", "testing", "unit", "suite" ]
keywords = [ "test", "testing", "unit", "suite", "expect", "matchers", "mops" ]
license = "MIT"

[dependencies]
Expand Down
18 changes: 9 additions & 9 deletions src/expect/lib.mo
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ module {
public let expect = {
bool = ExpectBool.ExpectBool;
int = ExpectInt.ExpectInt;
int8 = func(val : Int8) : ExpectInt8.ExpectInt8 = ExpectInt8.ExpectInt8(val);
int16 = func(val : Int16) : ExpectInt16.ExpectInt16 = ExpectInt16.ExpectInt16(val);
int32 = func(val : Int32) : ExpectInt32.ExpectInt32 = ExpectInt32.ExpectInt32(val);
int64 = func(val : Int64) : ExpectInt64.ExpectInt64 = ExpectInt64.ExpectInt64(val);
nat = func(val : Nat) : ExpectNat.ExpectNat = ExpectNat.ExpectNat(val);
nat8 = func(val : Nat8) : ExpectNat8.ExpectNat8 = ExpectNat8.ExpectNat8(val);
nat16 = func(val : Nat16) : ExpectNat16.ExpectNat16 = ExpectNat16.ExpectNat16(val);
nat32 = func(val : Nat32) : ExpectNat32.ExpectNat32 = ExpectNat32.ExpectNat32(val);
nat64 = func(val : Nat64) : ExpectNat64.ExpectNat64 = ExpectNat64.ExpectNat64(val);
int8 = ExpectInt8.ExpectInt8;
int16 = ExpectInt16.ExpectInt16;
int32 = ExpectInt32.ExpectInt32;
int64 = ExpectInt64.ExpectInt64;
nat = ExpectNat.ExpectNat;
nat8 = ExpectNat8.ExpectNat8;
nat16 = ExpectNat16.ExpectNat16;
nat32 = ExpectNat32.ExpectNat32;
nat64 = ExpectNat64.ExpectNat64;
char = ExpectChar.ExpectChar;
text = ExpectText.ExpectText;
array = ExpectArray.ExpectArray;
Expand Down
1 change: 1 addition & 0 deletions test/expect.test.mo
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ test("blob", func() {

test("principal", func() {
expect.principal(Principal.fromBlob(Blob.fromArray([1,2,3,4]))).equal(Principal.fromBlob(Blob.fromArray([1,2,3,4])));
expect.principal(Principal.fromBlob(Blob.fromArray([1,2,3,4]))).notEqual(Principal.fromBlob(Blob.fromArray([1,2,3,5])));
expect.principal(Principal.fromBlob("\04")).isAnonymous();
expect.principal(Principal.fromBlob(Blob.fromArray([4]))).isAnonymous();
});
Expand Down

0 comments on commit c2216f6

Please sign in to comment.