MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_constant_datum_from_str

Function test_constant_datum_from_str

core/src/mem.rs:353–359  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352 #[test]
353 fn test_constant_datum_from_str() {
354 let mut text = "hello".to_owned();
355 let datum = ConstantDatum::from(text.as_str());
356 text.clear();
357
358 assert_eq!(ConstantDatum::Text("hello".to_owned()), datum);
359 }
360
361 #[test]
362 fn test_constant_datum_from_string() {

Callers

nothing calls this directly

Calls 2

as_strMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected