trivet 3.1.0

The trivet Parser Library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Trivet
// Copyright (c) 2025 by Stacy Prowell.  All rights reserved.
// https://gitlab.com/binary-tools/trivet

//! Test the tools struct.

use crate::{errors::ParseResult, Tools};

#[test]
fn tools_test() -> ParseResult<()> {
    let mut tools = Tools::default();
    tools.set_string_standard(crate::strings::StringStandard::Rust);
    assert_eq!(tools.parse_f64("-19.01e2")?, -19.01e2);
    assert_eq!(tools.parse_i128("7_635")?, 7635);
    assert_eq!(tools.parse_u128("0b1011101010")?, 0b1011101010);
    Ok(())
}