MCPcopy Create free account
hub / github.com/aiscriptdev/aiscript / test_directive_with_mixed_array

Function test_directive_with_mixed_array

aiscript-directive/src/lib.rs:250–262  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248
249 #[test]
250 fn test_directive_with_mixed_array() {
251 let directive = parse_single_directive(r#"@values([1, "test", true])"#).unwrap();
252 assert_eq!(directive.name, "values");
253 match directive.params {
254 DirectiveParams::Array(values) => {
255 assert_eq!(values.len(), 3);
256 assert_eq!(values[0], json!(1));
257 assert_eq!(values[1], json!("test"));
258 assert_eq!(values[2], json!(true));
259 }
260 _ => panic!("Expected Array parameters"),
261 }
262 }
263
264 #[test]
265 fn test_directive_with_key_value() {

Callers

nothing calls this directly

Calls 1

parse_single_directiveFunction · 0.85

Tested by

no test coverage detected