teaql-tool-extra 0.1.1

Heavy-dependency extra utilities for the TeaQL Tool ecosystem.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use teaql_tool_extra::random::RandomTool;

#[test]
fn test_random_operations() {
    let tool = RandomTool::new();

    let num = tool.int(1, 10);
    assert!(num >= 1 && num <= 10);

    let float = tool.float(0.0, 1.0);
    assert!(float >= 0.0 && float <= 1.0);

    let bool_val = tool.boolean();
    // Just asserting it compiles and returns a bool
    assert!(bool_val || !bool_val);
}