DSTest
Functions
fail
function fail() internal
assertTrue
function assertTrue(
bool condition
) internal
Parameters
Name | Type | Description |
---|---|---|
condition | bool |
assertFalse
function assertFalse(
bool condition
) internal
Parameters
Name | Type | Description |
---|---|---|
condition | bool |
assertTrue
function assertTrue(
bool condition,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
condition | bool | |
err | string |
assertEq
function assertEq(
address a,
address b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | address | |
b | address |
assertEq
function assertEq(
address a,
address b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | address | |
b | address | |
err | string |
assertEq
function assertEq(
bytes32 a,
bytes32 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes32 | |
b | bytes32 |
assertEq
function assertEq(
bytes32 a,
bytes32 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes32 | |
b | bytes32 | |
err | string |
assertEq
function assertEq(
bool a,
bool b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bool | |
b | bool |
assertEq32
function assertEq32(
bytes32 a,
bytes32 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes32 | |
b | bytes32 |
assertEq32
function assertEq32(
bytes32 a,
bytes32 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes32 | |
b | bytes32 | |
err | string |
assertEq
function assertEq(
int256 a,
int256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 |
assertEq
function assertEq(
int256 a,
int256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
err | string |
assertEq
function assertEq(
uint256 a,
uint256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
assertEq
function assertEq(
uint256 a,
uint256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
err | string |
assertEqDecimal
function assertEqDecimal(
int256 a,
int256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 |
assertEqDecimal
function assertEqDecimal(
int256 a,
int256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 | |
err | string |
assertEqDecimal
function assertEqDecimal(
uint256 a,
uint256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 |
assertEqDecimal
function assertEqDecimal(
uint256 a,
uint256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 | |
err | string |
assertGt
function assertGt(
uint256 a,
uint256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
assertGt
function assertGt(
uint256 a,
uint256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
err | string |
assertGt
function assertGt(
int256 a,
int256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 |
assertGt
function assertGt(
int256 a,
int256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
err | string |
assertGtDecimal
function assertGtDecimal(
int256 a,
int256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 |
assertGtDecimal
function assertGtDecimal(
int256 a,
int256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 | |
err | string |
assertGtDecimal
function assertGtDecimal(
uint256 a,
uint256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 |
assertGtDecimal
function assertGtDecimal(
uint256 a,
uint256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 | |
err | string |
assertGe
function assertGe(
uint256 a,
uint256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
assertGe
function assertGe(
uint256 a,
uint256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
err | string |
assertGe
function assertGe(
int256 a,
int256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 |
assertGe
function assertGe(
int256 a,
int256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
err | string |
assertGeDecimal
function assertGeDecimal(
int256 a,
int256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 |
assertGeDecimal
function assertGeDecimal(
int256 a,
int256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 | |
err | string |
assertGeDecimal
function assertGeDecimal(
uint256 a,
uint256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 |
assertGeDecimal
function assertGeDecimal(
uint256 a,
uint256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 | |
err | string |
assertLt
function assertLt(
uint256 a,
uint256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
assertLt
function assertLt(
uint256 a,
uint256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
err | string |
assertLt
function assertLt(
int256 a,
int256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 |
assertLt
function assertLt(
int256 a,
int256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
err | string |
assertLtDecimal
function assertLtDecimal(
int256 a,
int256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 |
assertLtDecimal
function assertLtDecimal(
int256 a,
int256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 | |
err | string |
assertLtDecimal
function assertLtDecimal(
uint256 a,
uint256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 |
assertLtDecimal
function assertLtDecimal(
uint256 a,
uint256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 | |
err | string |
assertLe
function assertLe(
uint256 a,
uint256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
assertLe
function assertLe(
uint256 a,
uint256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
err | string |
assertLe
function assertLe(
int256 a,
int256 b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 |
assertLe
function assertLe(
int256 a,
int256 b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
err | string |
assertLeDecimal
function assertLeDecimal(
int256 a,
int256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 |
assertLeDecimal
function assertLeDecimal(
int256 a,
int256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | int256 | |
b | int256 | |
decimals | uint256 | |
err | string |
assertLeDecimal
function assertLeDecimal(
uint256 a,
uint256 b,
uint256 decimals
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 |
assertLeDecimal
function assertLeDecimal(
uint256 a,
uint256 b,
uint256 decimals,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 | |
decimals | uint256 | |
err | string |
assertEq
function assertEq(
string a,
string b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | string | |
b | string |
assertEq
function assertEq(
string a,
string b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | string | |
b | string | |
err | string |
checkEq0
function checkEq0(
bytes a,
bytes b
) internal returns (bool ok)
Parameters
Name | Type | Description |
---|---|---|
a | bytes | |
b | bytes |
assertEq0
function assertEq0(
bytes a,
bytes b
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes | |
b | bytes |
assertEq0
function assertEq0(
bytes a,
bytes b,
string err
) internal
Parameters
Name | Type | Description |
---|---|---|
a | bytes | |
b | bytes | |
err | string |
Events
log
event log(
string
)
Parameters
Name | Type | Description |
---|---|---|
`` | string |
logs
event logs(
bytes
)
Parameters
Name | Type | Description |
---|---|---|
`` | bytes |
log_address
event log_address(
address
)
Parameters
Name | Type | Description |
---|---|---|
`` | address |
log_bytes32
event log_bytes32(
bytes32
)
Parameters
Name | Type | Description |
---|---|---|
`` | bytes32 |
log_int
event log_int(
int256
)
Parameters
Name | Type | Description |
---|---|---|
`` | int256 |
log_uint
event log_uint(
uint256
)
Parameters
Name | Type | Description |
---|---|---|
`` | uint256 |
log_bytes
event log_bytes(
bytes
)
Parameters
Name | Type | Description |
---|---|---|
`` | bytes |
log_string
event log_string(
string
)
Parameters
Name | Type | Description |
---|---|---|
`` | string |
log_named_address
event log_named_address(
string key,
address val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | address |
log_named_bytes32
event log_named_bytes32(
string key,
bytes32 val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | bytes32 |
log_named_decimal_int
event log_named_decimal_int(
string key,
int256 val,
uint256 decimals
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | int256 | |
decimals | uint256 |
log_named_decimal_uint
event log_named_decimal_uint(
string key,
uint256 val,
uint256 decimals
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | uint256 | |
decimals | uint256 |
log_named_int
event log_named_int(
string key,
int256 val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | int256 |
log_named_uint
event log_named_uint(
string key,
uint256 val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | uint256 |
log_named_bytes
event log_named_bytes(
string key,
bytes val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | bytes |
log_named_string
event log_named_string(
string key,
string val
)
Parameters
Name | Type | Description |
---|---|---|
key | string | |
val | string |