MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / test_open_close

Function test_open_close

graphlite-ffi/src/lib.rs:436–445  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

434
435 #[test]
436 fn test_open_close() {
437 let mut error = GraphLiteErrorCode::Success;
438 let path = CString::new("/tmp/test_ffi_db").unwrap();
439
440 let db = unsafe { graphlite_open(path.as_ptr(), &mut error) };
441 assert!(!db.is_null());
442 assert_eq!(error, GraphLiteErrorCode::Success);
443
444 unsafe { graphlite_close(db) };
445 }
446}

Callers

nothing calls this directly

Calls 3

graphlite_openFunction · 0.85
graphlite_closeFunction · 0.85
unwrapMethod · 0.80

Tested by

no test coverage detected