message: Add tests for macros
  Check that both with and without trailing comma calls compile.
  Also, ensure that macros work.
diff: +#[macro_use]
  extern crate criterion;
  extern crate serde_json;
  extern crate tempdir;
  @@ -376,3 +377,68 @@ fn test_output_files() {
  verify_html(&dir, "report/index.html");
  }
  }
  +
  +mod macros {
  + use super::criterion;
  +
  + #[test]
  + #[should_panic(expected = "group executed")]
  + fn criterion_main() {
  + fn group() {}
  + fn group2() {
  + panic!("group executed");
  + }
  +
  + criterion_main!(group, group2);
  +
  + main();
  + }
  +
  + #[test]
  + fn criterion_main_trailing_comma() {
  + // make this a compile-only check
  + // as the second logger initialization causes panic
  + #[allow(dead_code)]
  + fn group() {}
  + #[allow(dead_code)]
  + fn group2() {}
  +
  + criterion_main!(group, group2,);
  +
  + // silence dead_code warning
  + if false {
  + main()
  + }
  + }
  +
  + #[test]
  + #[should_panic(expected = "group executed")]
  + fn criterion_group() {
  + use self::criterion::Criterion;
  +
  + fn group(_crit: &mut Criterion) {}
  + fn group2(_crit: &mut Criterion) {
  + panic!("group executed");
  + }
  +
  + criterion_group!(test_group, group, group2);
  +
  + test_group();
  + }
  +
  + #[test]
  + #[should_panic(expected = "group executed")]
  + fn criterion_group_trailing_comma() {
  + use self::criterion::Criterion;
  +
  + fn group(_crit: &mut Criterion) {}
  + fn group2(_crit: &mut Criterion) {
  + panic!("group executed");
  + }
  +
  + criterion_group!(test_group, group, group2,);
  +
  + test_group();
  + }
  +
  +}
  