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

Function run

src/expr/tests/test_runner.rs:168–222  ·  view source on GitHub ↗

error: unsupported operation: can't call foreign function `decContextDefault` on OS `linux`

()

Source from the content-addressed store, hash-verified

166 #[mz_ore::test]
167 #[cfg_attr(miri, ignore)] // error: unsupported operation: can't call foreign function `decContextDefault` on OS `linux`
168 fn run() {
169 datadriven::walk("tests/testdata", |f| {
170 f.run(move |s| -> String {
171 match s.directive.as_str() {
172 // tests simplification of scalars
173 "reduce" => match reduce(&s.input) {
174 Ok(scalar) => {
175 format!("{}\n", scalar)
176 }
177 Err(err) => format!("error: {}\n", err),
178 },
179 "canonicalize" => match test_canonicalize_pred(&s.input) {
180 Ok(preds) => {
181 format!("{}\n", separated("\n", preds.iter().map(|p| p.to_string())))
182 }
183 Err(err) => format!("error: {}\n", err),
184 },
185 "mfp" => match test_mfp(&s.input) {
186 Ok(mfp) => {
187 let (map, filter, project) = mfp.as_map_filter_project();
188 format!(
189 "[{}]\n[{}]\n[{}]\n",
190 separated(" ", map.iter()),
191 separated(" ", filter.iter()),
192 separated(" ", project.iter())
193 )
194 }
195 Err(err) => format!("error: {}\n", err),
196 },
197 "interpret" => match test_interpret(&s.input) {
198 Ok(contains) => {
199 format!("may contain: [{}]\n", contains.into_iter().join(" "))
200 }
201 Err(err) => format!("error: {}\n", err),
202 },
203 "canonicalize-join" => match test_canonicalize_equiv(&s.input) {
204 Ok(equivalences) => {
205 format!(
206 "{}\n",
207 separated(
208 "\n",
209 equivalences.iter().map(|e| format!(
210 "[{}]",
211 separated(" ", e.iter().map(|expr| format!("{}", expr)))
212 ))
213 )
214 )
215 }
216 Err(err) => format!("error: {}\n", err),
217 },
218 _ => panic!("unknown directive: {}", s.directive),
219 }
220 })
221 });
222 }
223}

Callers

nothing calls this directly

Calls 9

test_canonicalize_predFunction · 0.85
test_interpretFunction · 0.85
test_canonicalize_equivFunction · 0.85
as_map_filter_projectMethod · 0.80
reduceFunction · 0.70
test_mfpFunction · 0.70
walkFunction · 0.50
runMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected