Giter VIP home page Giter VIP logo

minunit's People

Contributors

bit4bit avatar boddmg avatar cr1901 avatar david-sinuela-pix4d avatar gregory-nisbet avatar happyfacade avatar michaelansel avatar msaf1980 avatar patboyer avatar saghul avatar siu avatar spencerbug avatar squeek502 avatar thomaspijper avatar trygvis avatar vitamincpp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

minunit's Issues

Issue with timer types not existing

Not sure what the exact problem is, but I had to remove the two timing functions. They were throwing errors about missing types(compile-time, not link-time) including timespec, timer_t and a few others.

Using Arch Linux 64bit

[earlz@EarlzAlpha src]$ uname -a
Linux EarlzAlpha 3.8.3-2-ARCH #1 SMP PREEMPT Sun Mar 17 13:04:22 CET 2013 x86_64 GNU/Linux

[earlz@EarlzAlpha src]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.7.2/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --disable-ppl-version-check --disable-cloog-version-check --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --with-linker-hash-style=gnu --disable-multilib --disable-libssp --disable-build-with-cxx --disable-build-poststage1-with-cxx --enable-checking=release
Thread model: posix
gcc version 4.7.2 (GCC)

mu_assert_double_eq not correctly printing

I have code:

    ...
    
    double data = 333.0;

    mu_assert_double_eq(data, 1000.0);
   
    ...

and minunit outputs:

...

.F
test_asd failed:
        ../test/test_asd.c:139: 333 expected but was 1000

...

I think that the correct sentence would be ../test/test_asd.c:139: 1000 expected but was 333?

I think the other mu_assert functions are affected by this bug.

compiler warnings when in use

I got lots of warnings and they're all warnings about two lines in minunit.h

In file included from minunit_example.c:1:
minunit_example.c: In function ‘test_suite’:
minunit.h:110:43: warning: comparing floating-point with ‘==’ or ‘!=’ is unsafe [-Wfloat-equal]
  110 |     MU__SAFE_BLOCK(if (minunit_real_timer == 0 && minunit_proc_timer == 0) {   \
      |                                           ^~
minunit.h:97:9: note: in definition of macro ‘MU__SAFE_BLOCK’
   97 |         block                                                                  \
      |         ^~~~~

Does not compile when using POSIX c99 command

This simple reference project fails to compile successfully due to minunit.c. Specifically, I get the following:

[koz@Sebastian kozvm]$ make
c99 -g -O1   -c -o test/test-stack.o test/test-stack.c
In file included from test/test-stack.c:19:0:
test/../include/minunit.h: In function ‘mu_timer_real’:
test/../include/minunit.h:267:19: error: storage size of ‘ts’ isn’t known
   struct timespec ts;
                   ^~
test/../include/minunit.h:284:9: error: unknown type name ‘clockid_t’
   const clockid_t id = (clockid_t)-1; /* Unknown. */
         ^~~~~~~~~
test/../include/minunit.h:284:25: error: ‘clockid_t’ undeclared (first use in this function); did you mean ‘clock_t’?
   const clockid_t id = (clockid_t)-1; /* Unknown. */
                         ^~~~~~~~~
                         clock_t
test/../include/minunit.h:284:25: note: each undeclared identifier is reported only once for each function it appears in
test/../include/minunit.h:286:31: warning: implicit declaration of function ‘clock_gettime’; did you mean ‘localtime’? [-Wimplicit-function-declaration]
   if ( id != (clockid_t)-1 && clock_gettime( id, &ts ) != -1 )
                               ^~~~~~~~~~~~~
                               localtime
test/../include/minunit.h: In function ‘mu_timer_cpu’:
test/../include/minunit.h:330:3: error: unknown type name ‘clockid_t’; did you mean ‘clock_t’?
   clockid_t id;
   ^~~~~~~~~
   clock_t
test/../include/minunit.h:331:19: error: storage size of ‘ts’ isn’t known
   struct timespec ts;
                   ^~
test/../include/minunit.h:343:10: error: ‘clockid_t’ undeclared (first use in this function); did you mean ‘clock_t’?
    id = (clockid_t)-1;
          ^~~~~~~~~
          clock_t
make: *** [<builtin>: test/test-stack.o] Error 1

Part of this is due to a missing #include <sys/types.h>, but that only fixes part of the issue.

GetSystemTimePreciseAsFileTime not found in KERNEL32.DLL

Hello, I have a problem with a missing function in the dynamicaly loaded library (KERNEL32.DLL) on my Windows 7 machine. I thing the problem is in the line #if defined(NTDDI_WIN8) && NTDDI_VERSION > NTDDI_WIN8, This is defined as the Visual Studio shows, because of instalation of Windows 8 SDK.

muunit

I succesfully compiled the library with some minor changes in the header file but this works for me and I am not sure what is the best solution.

Windows7, VS2015

Support for multiple MU_TEST_SUITE() from different .c files?

Would you be interested in supporting multiple MU_TEST_SUITE() from different .c files? I am offering to implement it.
I know that with this MinUnit would lose the "single header file" characteristics, but I think that it is better to split tests for different modules in different files.

Add install script

Hey guys,

I was wondering if it would be a good idea to make an install script?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.