Skip to content

Commit

Permalink
[v1.0.0] Merge branch 'bleeding'
Browse files Browse the repository at this point in the history
  • Loading branch information
Snaipe committed Mar 17, 2015
2 parents 86470aa + b14c56f commit 0285d32
Show file tree
Hide file tree
Showing 25 changed files with 416 additions and 160 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ script:
after_success:
- coveralls --gcov gcov-4.9 --exclude samples --exclude dependencies --gcov-options '\-lp' -b .
after_failure:
- cat $(find check -iname '*.log') /dev/null
- cat $(find samples -iname '*.log') /dev/null
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2015-03-18 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>
* src/timer.*: Added test timings
* src/, include/: Changed assert prototypes
* include/: ANSI compliance over header files
* *: Windows + FreeBSD compatibility

2015-03-11 Franklin "Snaipe" Mathieu <franklinmathieu@gmail.com>

* include/criterion/logging.h, src/logging.c: A logging interface
Expand Down
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ libcriterion_la_SOURCES = \
src/stats.h \
src/logging.c \
src/options.c \
src/timer.c \
src/timer.h \
src/main.c
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Criterion
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://github.com/Snaipe/Criterion/blob/master/LICENSE)
[![Version](https://img.shields.io/github/tag/Snaipe/Criterion.svg?label=version&style=flat)](https://github.com/Snaipe/Criterion/releases)

A dead-simple, yet extensible, C test framework.
A dead-simple, yet extensible, C unit testing framework.

![Screencast](./doc/screencast.gif)

Expand All @@ -30,13 +30,14 @@ the user would have with other frameworks:
reported and tested.
* [x] Progress and statistics can be followed in real time with report hooks.
* [x] TAP output format can be enabled with an option.
* [x] Runs on Linux, Mac OS X, and Windows (compiles only with Cygwin for the moment).
* [x] Runs on Linux, FreeBSD, Mac OS X, and Windows (compiles only with Cygwin for the moment).

## Downloads

* [Linux (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v0.3/criterion-0.3-linux-x86_64.tar.bz2)
* [OS X (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v0.3/criterion-0.3-osx-x86_64.tar.bz2)
* [Windows (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v0.3/criterion-0.3-win-x86_64.tar.bz2)
* [Linux (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.0.0/criterion-1.0.0-linux-x86_64.tar.bz2)
* [OS X (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.0.0/criterion-1.0.0-osx-x86_64.tar.bz2)
* [Windows (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.0.0/criterion-1.0.0-win-x86_64.tar.bz2)
* [FreeBSD (x86_64)](https://github.com/Snaipe/Criterion/releases/download/v1.0.0/criterion-1.0.0-freebsd-x86_64.tar.bz2)

If you have a different platform, you can still [build the library from source](http://criterion.readthedocs.org/en/latest/setup.html#installation)

Expand All @@ -51,6 +52,7 @@ Sample tests can be found in the [sample directory][samples].

* [A simple test][sample-simple]
* [Using multiple suites][sample-suites]
* [Writing assertions][sample-asserts]
* [Adding test fixtures][sample-fixtures]
* [Tests with signals][sample-signal]
* [Using report hooks][sample-report]
Expand All @@ -68,9 +70,8 @@ A. I worked with CUnit and Check, and I must say that they do their job

**Q. Where has this been tested?**
A. Currently, on Linux 2.6.32 and Linux 3.15.7, although it should work on
most \*nix systems; Mac OS X Yosemite 10.10, and finally Windows 7 (with
the Cygwin port of GCC).
More tests will be added on the build matrix.
most \*nix systems; Mac OS X Yosemite 10.10, FreeBSD 10.0, and finally
Windows 7 (with the Cygwin port of GCC).

**Q. Can I use it on Windows without Cygwin?**
A. Yes, you can, Cygwin is only required to compile the static library if
Expand All @@ -85,6 +86,7 @@ A. Yes, you can, Cygwin is only required to compile the static library if
[samples]: ./samples/
[sample-simple]: ./samples/simple.c
[sample-suites]: ./samples/suites.c
[sample-asserts]: ./samples/asserts.c
[sample-fixtures]: ./samples/fixtures.c
[sample-signal]: ./samples/signal.c
[sample-report]: ./samples/report.c
70 changes: 70 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
version: 1.0.0_b{build}-{branch}

os: Windows Server 2012

init:
- ps: (New-Object System.Net.WebClient).DownloadFile("https://cygwin.com/setup-x86.exe", "c:\setup-x86.exe")
- git config --global core.autocrlf input
- c:\setup-x86.exe -qnNdO -R %CYG_ROOT% -s %CYG_MIRROR% -l %CYG_CACHE% \
-P autoconf \
-P automake \
-P gcc-core \
-P mingw-runtime \
-P mingw-binutils \
-P mingw-gcc-core \
-P mingw-pthreads \
-P mingw-w32api \
-P libtool \
-P make \
-P python \
-P gettext-devel \
-P gettext \
-P expat \
-P intltool \
-P libiconv \
-P pkg-config \
-P check \
-P git \
-P wget \
-P curl
- "%CYG_BASH% -lc 'echo $PATH'"

environment:
global:
CYG_ROOT: C:\cygwin
CYG_MIRROR: http://cygwin.mirror.constant.com
CYG_CACHE: C:\cygwin\var\cache\setup
CYG_BASH: C:\cygwin\bin\bash

cache:
- '%CYG_CACHE%'

clone_depth: 5

matrix:
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.

platform:
- x86
- Any CPU

configuration: Release

install:
- "%CYG_BASH% -lc 'cd $APPVEYOR_BUILD_FOLDER; ./autogen.sh'"
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; ./configure"'

build_script:
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make"'

test_script:
- '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0</dev/null; make check"'

after_test:
- '%CYG_BASH% -lc "cat $(find $APPVEYOR_BUILD_FOLDER/samples -iname \"*.log\") /dev/null'

notifications:

- provider: Email
to: [franklinmathieu@gmail.com]
on_build_status_changed: true
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([criterion], [1.0], [], [criterion], [franklinmathieu@gmail.com])
AC_INIT([criterion], [1.0.0], [], [criterion], [franklinmathieu@gmail.com])
AC_CONFIG_SRCDIR([src/runner.c])

LT_PREREQ([2.2.4])
Expand Down
2 changes: 1 addition & 1 deletion dependencies/csptr
Submodule csptr updated from 30b338 to 3b6b26
16 changes: 8 additions & 8 deletions doc/starter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,22 @@ parameter, and an optional failure message:
On top of those, more assertions are available for common operations:

* ``{assert,expect}_not(Actual, Expected, [Message])``
* ``{assert,expect}_equal(Actual, Expected, [Message])``
* ``{assert,expect}_not_equal(Actual, Unexpected, [Message])``
* ``{assert,expect}_eq(Actual, Expected, [Message])``
* ``{assert,expect}_neq(Actual, Unexpected, [Message])``
* ``{assert,expect}_lt(Actual, Expected, [Message])``
* ``{assert,expect}_leq(Actual, Expected, [Message])``
* ``{assert,expect}_gt(Actual, Expected, [Message])``
* ``{assert,expect}_geq(Actual, Expected, [Message])``
* ``{assert,expect}_float_equal(Actual, Expected, Epsilon, [Message])``
* ``{assert,expect}_float_not_equal(Actual, Unexpected, Epsilon, [Message])``
* ``{assert,expect}_strings_equal(Actual, Expected, [Message])``
* ``{assert,expect}_strings_not_equal(Actual, Unexpected, [Message])``
* ``{assert,expect}_float_eq(Actual, Expected, Epsilon, [Message])``
* ``{assert,expect}_float_neq(Actual, Unexpected, Epsilon, [Message])``
* ``{assert,expect}_strings_eq(Actual, Expected, [Message])``
* ``{assert,expect}_strings_neq(Actual, Unexpected, [Message])``
* ``{assert,expect}_strings_lt(Actual, Expected, [Message])``
* ``{assert,expect}_strings_leq(Actual, Expected, [Message])``
* ``{assert,expect}_strings_gt(Actual, Expected, [Message])``
* ``{assert,expect}_strings_geq(Actual, Expected, [Message])``
* ``{assert,expect}_arrays_equal(Actual, Expected, Size, [Message])``
* ``{assert,expect}_arrays_not_equal(Actual, Unexpected, Size, [Message])``
* ``{assert,expect}_arrays_eq(Actual, Expected, Size, [Message])``
* ``{assert,expect}_arrays_neq(Actual, Unexpected, Size, [Message])``

Fixtures
--------
Expand Down
Loading

0 comments on commit 0285d32

Please sign in to comment.