Skip to content

Commit 07d3c59

Browse files
committed
Remove benchmarks, as the test crate is not being stabilizied.
1 parent e2e23a0 commit 07d3c59

File tree

2 files changed

+2
-29
lines changed

2 files changed

+2
-29
lines changed

src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#![crate_name = "cssparser"]
66
#![crate_type = "rlib"]
77

8-
#![feature(core, collections)]
9-
#![cfg_attr(test, feature(test))]
8+
#![feature(collections)]
109
#![deny(missing_docs)]
1110

1211
/*!
@@ -69,7 +68,6 @@ extern crate encoding;
6968
extern crate text_writer;
7069
#[macro_use] extern crate matches;
7170
#[cfg(test)] extern crate tempdir;
72-
#[cfg(test)] extern crate test;
7371
#[cfg(test)] extern crate "rustc-serialize" as serialize;
7472

7573
pub use tokenizer::{Token, NumericValue, PercentageValue, SourceLocation};

src/tests.rs

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ use std::num::Float;
1111
use std::mem;
1212
use serialize::json::{self, Json, ToJson};
1313
use tempdir::TempDir;
14-
use test;
1514

1615
use encoding::label::encoding_from_whatwg_label;
1716

@@ -20,7 +19,7 @@ use super::{Parser, Delimiter, Token, NumericValue, PercentageValue, SourceLocat
2019
AtRuleType, AtRuleParser, QualifiedRuleParser,
2120
parse_one_declaration, parse_one_rule, parse_important,
2221
decode_stylesheet_bytes,
23-
Color, RGBA, parse_color_keyword, parse_nth, ToCss};
22+
Color, RGBA, parse_nth, ToCss};
2423

2524

2625
macro_rules! JArray {
@@ -300,30 +299,6 @@ fn color3_keywords() {
300299
}
301300

302301

303-
#[bench]
304-
fn bench_color_lookup_red(b: &mut test::Bencher) {
305-
b.iter(|| {
306-
test::black_box(parse_color_keyword("red"))
307-
});
308-
}
309-
310-
311-
#[bench]
312-
fn bench_color_lookup_lightgoldenrodyellow(b: &mut test::Bencher) {
313-
b.iter(|| {
314-
test::black_box(parse_color_keyword("lightgoldenrodyellow"))
315-
});
316-
}
317-
318-
319-
#[bench]
320-
fn bench_color_lookup_fail(b: &mut test::Bencher) {
321-
b.iter(|| {
322-
test::black_box(parse_color_keyword("lightgoldenrodyellowbazinga"))
323-
});
324-
}
325-
326-
327302
#[test]
328303
fn nth() {
329304
run_json_tests(include_str!("css-parsing-tests/An+B.json"), |input| {

0 commit comments

Comments
 (0)