Add bench

This commit is contained in:
Yong Wen Chua 2017-07-17 18:06:06 +08:00
parent 56de116595
commit 191868573d
1 changed files with 9 additions and 1 deletions

View File

@ -1,10 +1,11 @@
//! This crate tests using rocket_cors using Fairings
#![feature(plugin, custom_derive)]
#![feature(plugin, custom_derive, test)]
#![plugin(rocket_codegen)]
extern crate hyper;
extern crate rocket;
extern crate rocket_cors;
extern crate test;
use std::str::FromStr;
@ -85,6 +86,13 @@ fn smoke_test() {
}
use test::Bencher;
#[bench]
fn bench_smoke_test(b: &mut Bencher) {
b.iter(|| smoke_test());
}
#[test]
fn cors_options_check() {
let client = Client::new(rocket()).unwrap();