MCPcopy Create free account
hub / github.com/AmrDeveloper/GQL / ago_direction

Function ago_direction

crates/gitql-parser/src/parse_interval.rs:396–408  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394
395 #[test]
396 fn ago_direction() {
397 let parse_result = parse_interval_literal("1 y 1 m 1 w 1 d", SourceLocation::default());
398 assert!(parse_result.is_ok());
399
400 let parse_result_with_ago =
401 parse_interval_literal("1 y 1 m 1 w 1 d ago", SourceLocation::default());
402 assert!(parse_result_with_ago.is_ok());
403
404 assert_eq!(
405 parse_result.ok().unwrap().mul(-1).unwrap(),
406 parse_result_with_ago.ok().unwrap()
407 );
408 }
409
410 #[test]
411 fn invalid_time() {

Callers

nothing calls this directly

Calls 1

parse_interval_literalFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…