philipp-classen / cppquickcheck Goto Github PK
View Code? Open in Web Editor NEWThis project forked from grogers0/cppquickcheck
QuickCheck-like property based automated testing tool for C++
License: BSD 2-Clause "Simplified" License
This project forked from grogers0/cppquickcheck
QuickCheck-like property based automated testing tool for C++
License: BSD 2-Clause "Simplified" License
Fetched 281 kB in 10s (26.6 kB/s)
Reading package lists... Done
W: The repository 'http://llvm.org/apt/precise llvm-toolchain-precise-3.8 Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://ppa.launchpad.net/couchdb/stable/ubuntu/dists/trusty/Release.gpg: Signature by key 15866BAFD9BCC4F3C1E0DFC7D69548E1C17EAB57 uses weak digest algorithm (SHA1)
W: The repository 'http://ppa.launchpad.net/ubuntu-cloud-archive/icehouse-staging/ubuntu trusty Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: http://ppa.launchpad.net/h-rayflood/gcc-upper/ubuntu/dists/trusty/Release.gpg: Signature by key EF9300D9D55E308863EA191B9DB3C0CF23957A28 uses weak digest algorithm (SHA1)
E: Failed to fetch http://ppa.launchpad.net/ubuntu-cloud-archive/icehouse-staging/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found
E: Failed to fetch http://ppa.launchpad.net/ubuntu-cloud-archive/icehouse-staging/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
The travis setup is quite old. While fixing it, it would to be a good opportunity to migrate it to a Docker setup:
At the moment, src/Arbitrary.cpp prevents the library from being used in a header-only style. Starting with C++17, this could be avoided.
Idea: For C++11, leave everything as it is, but for C++17, provide a single, header-only version of the library.
Advantage: In C++17 environments, this would simplify the installation.
Please add the clang-format
configuration file to the repository.
Without the config file the process of formatting using clang-format
is not reproducible. For example, I'm getting a lot of "spurious" changes which I just run clang-format -i ...
on my system.
The file can be generated by running clang-format -style=... -dump-config
on your system. (You might need to change the settings to whatever you used originally when reformatting.)
It seems that the default Arbitrary instances for integral types return very small values. Here's the small prop I've been using to test:
template <typename T>
struct ReproducerProp: cppqc::Property<T>
{
bool check(const T &expected) const override
{
std::cout << expected << std::endl;
if (expected > 255) {
return false;
}
if (expected < -255) {
return false;
}
return true;
}
};
I would certainly have expected this to fail at least some of the time, but I've done ~20 runs (each with 100 tests) and it's not failed so far.
It seems very odd that it's not using the full range of the type by default.
(Generally speaking it might also be a good idea to make sure to always include the min/max/0 value for any given type in the set of integers tested, by that's another issue.)
EDIT: Oh, the runner code is
quickCheckOutput(ReproducerProp<long>());
Tested current master.
(issue migrated from grogers0/CppQuickCheck)
We already have C++11 as a requirement. Some aspects, which are currently implemented via Boost, could now be replaced. For instance:
For now, I would avoid upgrading to C++14 unless there is a significant need. However, starting to gradually migrate straightforward parts (currently implemented with Boost) to C++11 should simplify the maintenance in the long run.
From what I see, it would eliminate the need for Boost. Although a dependency to Boost is not really harmful, we should avoid it if all functionality that we are using comes now with C++11.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.