Skip to content

Add messages to assert statements #380

@heueristik

Description

@heueristik

Context

assertEq, assertLt, ... allow to add a message string.

Scope

Add messages to all asserts as done, for example, here:

function test_constructor_initializes_the_tree_with_depth_0() public {
assertEq(new CommitmentTree().commitmentTreeDepth(), 0, "The initial tree depth should be 0.");
}
function test_constructor_initializes_the_tree_with_capacity_1() public {
assertEq(new CommitmentTree().commitmentTreeCapacity(), 1, "The initial tree capacity should be 1.");
}
function test_constructor_initializes_the_tree_with_0_leaves() public {
assertEq(new CommitmentTree().commitmentCount(), 0, "The initial commitment count should be 0.");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions