- Notifications
You must be signed in to change notification settings - Fork 226
/
Copy pathKittyCoreTest.sol
35 lines (27 loc) · 1.04 KB
/
KittyCoreTest.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
pragma solidity^0.4.18;
import'./KittyCore.sol';
/// @title Kitty core with extra test fn and overrides
contractKittyCoreTestisKittyCore {
// https://ethereum.stackexchange.com/questions/16318/inherited-constructors
function KittyCoreTest() public {
}
/*** ALL TEST FUNCTIONS GO HERE: ***/
/// @dev Contract owner can create kittens at will (test-only)
/// @param _genes the actual genetic load of kittens
/// @param _cloneCount how many are being created
function mintKittens(uint256_genes, uint32_cloneCount) public onlyCOO whenNotPaused {
// NOTE: this method should be removed after ETHWaterloo
// require(_genes > 0);
require(_cloneCount >0);
for (uint256 i =0; i < _cloneCount; i++) {
_createKitty(0, 0, 0, _genes, msg.sender);
}
}
/// @dev for tests we can easily fund the contract
function fundMe() publicpayablereturns (bool) {
returntrue;
}
function timeNow() publicconstantreturns (uint256) {
returnnow;
}
}