Skip to content

Commit

Permalink
Revert "test: fix use of doc_comment"
Browse files Browse the repository at this point in the history
This reverts commit 1fc8b0d.

It turns out that `cfg(doctest)` wasn't stabilized until Rust 1.40, so
we can't use it yet.
  • Loading branch information
BurntSushi committed Mar 7, 2020
1 parent 1fc8b0d commit 1951d5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn main() {
`szip` is a tool with similar behavior as `gzip`, except it uses Snappy
compression. It can be installed with Cargo:

```ignore
```
$ cargo install szip
```

Expand All @@ -95,13 +95,13 @@ library in your `LD_LIBRARY_PATH` (or equivalent).

To run tests, you'll need to explicitly run the `test` crate:

```ignore
```
$ cargo test --manifest-path test/Cargo.toml
```

To test that this library matches the output of the reference C++ library, use:

```ignore
```
$ cargo test --manifest-path test/Cargo.toml --features cpp
```

Expand Down Expand Up @@ -129,7 +129,7 @@ The performance of this implementation should roughly match the performance of
the C++ implementation on x86_64. Below are the results of the microbenchmarks
(as defined in the C++ library):

```ignore
```
group snappy/cpp/ snappy/snap/
----- ----------- ------------
compress/zflat00_html 1.00 94.5±0.62µs 1033.1 MB/sec 1.02 96.1±0.74µs 1016.2 MB/sec
Expand Down Expand Up @@ -167,7 +167,7 @@ implementation of Snappy (which has a hand rolled implementation in Assembly).
Note that these were run using Go's microbenchmark tool, so the numbers may not
be directly comparable, but they should serve as a useful signpost:

```ignore
```
Benchmark_UFlat0 25040 45180 ns/op 2266.49 MB/s
Benchmark_UFlat1 2648 451475 ns/op 1555.10 MB/s
Benchmark_UFlat2 229965 4788 ns/op 25709.01 MB/s
Expand Down Expand Up @@ -197,7 +197,7 @@ Benchmark_ZFlat11 4070 293952 ns/op 627.04 MB/s
To run benchmarks, including the reference C++ implementation, do the
following:

```ignore
```
$ cd bench
$ cargo bench --features cpp -- --save-baseline snappy
```
Expand All @@ -206,14 +206,14 @@ To compare them, as shown above, install
[`critcmp`](https://github.com/BurntSushi/critcmp)
and run (assuming you saved the baseline above under the name `snappy`):

```ignore
```
$ critcmp snappy -g '.*?/(.*$)'
```

Finally, the Go benchmarks were run with the following command on commit
`ff6b7dc8`:

```ignore
```
$ go test -cpu 1 -bench Flat -download
```

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ fn main() {

#![deny(missing_docs)]

#[cfg(doctest)]
#[cfg(test)]
doc_comment::doctest!("../README.md");

pub use crate::error::{Error, Result};
Expand Down

0 comments on commit 1951d5d

Please sign in to comment.