MCPcopy Create free account
hub / github.com/cel-rust/cel-rust / test_numeric_map_access

Function test_numeric_map_access

cel/src/objects.rs:1808–1817  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1806
1807 #[test]
1808 fn test_numeric_map_access() {
1809 let mut context = Context::default();
1810 let mut numbers = HashMap::new();
1811 numbers.insert(Key::Uint(1), "one".to_string());
1812 context.add_variable_from_value("numbers", numbers);
1813
1814 let program = Program::compile("numbers[1u]").unwrap();
1815 let value = program.execute(&context).unwrap();
1816 assert_eq!(value, "one".into());
1817 }
1818
1819 #[test]
1820 fn test_heterogeneous_compare() {

Callers

nothing calls this directly

Calls 2

executeMethod · 0.80

Tested by

no test coverage detected