Move parsing files around (#4626)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -797,7 +797,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_serialize_function() {
|
||||
let some_function = crate::ast::types::Function::StdLib {
|
||||
let some_function = crate::parsing::ast::types::Function::StdLib {
|
||||
func: Box::new(crate::std::sketch::Line),
|
||||
};
|
||||
let serialized = serde_json::to_string(&some_function).unwrap();
|
||||
@ -807,11 +807,11 @@ mod tests {
|
||||
#[test]
|
||||
fn test_deserialize_function() {
|
||||
let some_function_string = r#"{"type":"StdLib","func":{"name":"line","summary":"","description":"","tags":[],"returnValue":{"type":"","required":false,"name":"","schema":{},"schemaDefinitions":{}},"args":[],"unpublished":false,"deprecated":false, "examples": []}}"#;
|
||||
let some_function: crate::ast::types::Function = serde_json::from_str(some_function_string).unwrap();
|
||||
let some_function: crate::parsing::ast::types::Function = serde_json::from_str(some_function_string).unwrap();
|
||||
|
||||
assert_eq!(
|
||||
some_function,
|
||||
crate::ast::types::Function::StdLib {
|
||||
crate::parsing::ast::types::Function::StdLib {
|
||||
func: Box::new(crate::std::sketch::Line)
|
||||
}
|
||||
);
|
||||
|
Reference in New Issue
Block a user