orangeduck / ptest Goto Github PK
View Code? Open in Web Editor NEWDRY Microtesting Framework for C
DRY Microtesting Framework for C
Hello!
I was just building your other MPC project for fun and profit using Jenkins and the ptest output unexpectedly mixes colors at some point. I didn't investigate further but I would say it's just because you assume a different default color at some point. Screenshot attached. This is a very minor issue, but simple to fix so why not.
That being said, I discovered ptest at the same time and it seems great. I'll try to give a shot for my next C project.
My gcc -v
output:
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/7.2.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/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 --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 7.2.1 20171128 (GCC)
When I simply run make
it produces such an output:
gcc -ansi -Wall -Werror -Wno-unused -g example.c ptest.c -o example
./example; true
+-------------------------------------------+
| ptest MicroTesting Magic for C |
| |
| http://github.com/orangeduck/ptest |
| |
| Daniel Holden ([email protected]) |
+-------------------------------------------+
===== Suite Basic =====
| Test Maths ... Failed!
1. Segmentation Fault
| Stopping Execution.
gcc -ansi -Wall -Werror -Wno-unused -g example2.c ptest.c -o example2
./example2; true
+-------------------------------------------+
| ptest MicroTesting Magic for C |
| |
| http://github.com/orangeduck/ptest |
| |
| Daniel Holden ([email protected]) |
+-------------------------------------------+
===== Suite Basic =====
| Test Maths ... Passed!
| Test Strings ... Passed!
===== Suite Other =====
| Test Stuff ... Passed!
| Test Failure ... Failed!
1. Assert [ false == true ] (example2.c:26)
+---------------------------------------------------+
| Summary |
+---------++------------+-------------+-------------+
| Suites || Total 2 | Passed 1 | Failed 1 |
| Tests || Total 4 | Passed 3 | Failed 1 |
| Asserts || Total 9 | Passed 8 | Failed 1 |
+---------++------------+-------------+-------------+
Total Running Time: 0.000s
As far as I can see my gcc is able to compile nested functions, but when this function call is made (I think at ptest.c:293
) a segfault occurs.
What am I doing wrong or is it a bug?
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.