BurntSushi / quickcheck

Automated property based testing for Rust (with shrinking).
The Unlicense
2.4k stars 149 forks source link

readme documentation for quickcheck_macros is outdated #227

Closed Charles-Johnson closed 4 years ago

Charles-Johnson commented 5 years ago

I am trying to use quickcheck in my integrations tests. At the beginning one of the test files I have added:

#![feature(plugin)]
#![plugin(quickcheck_macros)]

extern crate my_project;
#[cfg(test)]
extern crate quickcheck;

followed by use statements and #[test] functions definitions.

In my Cargo.toml file I have:

[dev-dependencies]
quickcheck = "0.8"
quickcheck_macros = "0.8"

When compiling my_project I get this

error: /home/charles/my_workspace/target/debug/deps/libquickcheck_macros-4d9dd5db3e15aaa1.so: undefined symbol: __rustc_plugin_registrar_e32604afeb7083bcd5f34dda9dbf0cd__
  --> my_project/tests/definitions.rs:19:11
   |
19 | #![plugin(quickcheck_macros)]
   |           ^^^^^^^^^^^^^^^^^

error: aborting due to previous error

error: Could not compile `my_project`.
warning: build failed, waiting for other jobs to finish...
error: build failed
BurntSushi commented 5 years ago

The README looks out dated. You shouldn't need #![feature(plugin)] or #![plugin(quickcheck_macros)] any more. It now works on Rust stable. See: https://github.com/BurntSushi/quickcheck/blob/master/quickcheck_macros/examples/attribute.rs

BurntSushi commented 4 years ago

It looks like this was fixed in 8ec8cb1dc9db4cfbdf5fe6898377168b0c4a26e6.