Skip to content

Commit 8333805

Browse files
authored
Update my_token_tests.move
1 parent 7cd2844 commit 8333805

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

mytoken/tests/my_token_tests.move

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,25 @@
11
module MyToken::coin_tests {
2-
use std::signer;
32
use MyToken::coin;
43

54
#[test]
65
public fun test_mint_and_balance() {
7-
let c = coin::mint(&signer::spec_test_signer(), 100);
6+
let c = coin::mint(100);
87
assert!(coin::balance(&c) == 100, 0);
98
}
109

1110
#[test]
1211
public fun test_transfer() {
13-
let mut c1 = coin::mint(&signer::spec_test_signer(), 100);
12+
let c1 = coin::mint(100);
1413
let c2 = coin::transfer(&mut c1, 40);
1514
assert!(coin::balance(&c1) == 60, 1);
1615
assert!(coin::balance(&c2) == 40, 2);
1716
}
1817

19-
#[test]
20-
public fun test_transfer_fail() {
21-
let mut c1 = coin::mint(&signer::spec_test_signer(), 10);
22-
// ожидаем фейл, если пытаемся перевести больше, чем есть
23-
// тут 20 > 10 → будет abort
24-
let _c2 = coin::transfer(&mut c1, 20);
25-
}
26-
2718
#[test]
2819
public fun test_burn() {
29-
let c = coin::mint(&signer::spec_test_signer(), 50);
20+
let c = coin::mint(50);
3021
let burned = coin::burn(c);
3122
assert!(burned == 50, 3);
3223
}
3324
}
25+

0 commit comments

Comments
 (0)