2 // aux-build:example_runner.rs
3 // compile-flags:--test
5 #![feature(custom_test_frameworks)]
6 #![test_runner(example_runner::runner)]
7 extern crate example_runner;
9 pub struct IsFoo(&'static str);
11 impl example_runner::Testable for IsFoo {
12 fn name(&self) -> String {
16 fn run(&self) -> Option<String> {
18 return Some(format!("{} != foo", self.0));
25 const TEST_1: IsFoo = IsFoo("hello");
28 const TEST_2: IsFoo = IsFoo("foo");