MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / create_test_enum

Function create_test_enum

src/lowertest/tests/test_runner.rs:170–184  ·  view source on GitHub ↗
(
        s: &str,
        args: &HashMap<String, Vec<String>>,
    )

Source from the content-addressed store, hash-verified

168 }
169
170 fn create_test_enum(
171 s: &str,
172 args: &HashMap<String, Vec<String>>,
173 ) -> Result<Option<TestEnum>, String> {
174 let stream = tokenize(s)?;
175 if args.get("override").is_some() {
176 deserialize_optional(
177 &mut stream.into_iter(),
178 "TestEnum",
179 &mut TestOverrideDeserializeContext::default(),
180 )
181 } else {
182 deserialize_optional_generic(&mut stream.into_iter(), "TestEnum")
183 }
184 }
185
186 fn build(s: &str, args: &HashMap<String, Vec<String>>) -> Result<String, String> {
187 // 1) Go from original spec to TestEnum.

Callers 1

buildFunction · 0.85

Calls 6

deserialize_optionalFunction · 0.85
is_someMethod · 0.80
tokenizeFunction · 0.50
getMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected