MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / argument_type

Function argument_type

cranelift/reader/src/parser.rs:3078–3092  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3076
3077 #[test]
3078 fn argument_type() {
3079 let mut p = Parser::new("i32 sext");
3080 let arg = p.parse_abi_param().unwrap();
3081 assert_eq!(arg.value_type, types::I32);
3082 assert_eq!(arg.extension, ArgumentExtension::Sext);
3083 assert_eq!(arg.purpose, ArgumentPurpose::Normal);
3084 let ParseError {
3085 location,
3086 message,
3087 is_warning,
3088 } = p.parse_abi_param().unwrap_err();
3089 assert_eq!(location.line_number, 1);
3090 assert_eq!(message, "expected parameter type");
3091 assert!(!is_warning);
3092 }
3093
3094 #[test]
3095 fn aliases() {

Callers

nothing calls this directly

Calls 3

parse_abi_paramMethod · 0.80
newFunction · 0.50
unwrapMethod · 0.45

Tested by

no test coverage detected