0
I Use This!
Very Low Activity
Analyzed about 12 hours ago. based on code collected about 19 hours ago.

Project Summary

PCUT is a very simple framework for unit testing of C code. Unlike many other frameworks where you need to specify manually which functions belong to a particular test, PCUT provides several smart macros that hides this and lets you focus on the most important part of testing only: that is, coding the test cases.

Tests for the standard atoi() function may look like this:

#include < pcut/pcut.h >
#include < stdlib.h >

PCUT_INIT

PCUT_TEST(atoi_zero) {
PCUT_ASSERT_INT_EQUALS(0, atoi("0"));
}

PCUT_TEST(atoi_positive) {
PCUT_ASSERT_INT_EQUALS(42, atoi("42"));
}

PCUT_TEST(atoi_negative) {
PCUT_ASSERT_INT_EQUALS(-273, atoi("-273"));
}

PCUT_MAIN()

Tags

c testing unittest unit_testing unittesting

In a Nutshell, PCUT: Plain C Unit Testing...

Quick Reference

BSD 3-clause "New" or "Revised" License
Permitted

Commercial Use

Modify

Distribute

Place Warranty

Forbidden

Hold Liable

Use Trademarks

Required

Include Copyright

Include License

These details are provided for information only. No information here is legal advice and should not be used as such.

Project Security

Vulnerabilities per Version ( last 10 releases )

There are no reported vulnerabilities

Project Vulnerability Report

Security Confidence Index

Poor security track-record
Favorable security track-record

Vulnerability Exposure Index

Many reported vulnerabilities
Few reported vulnerabilities

Did You Know...

  • ...
    65% of companies leverage OSS to speed application development in 2016
  • ...
    check out hot projects on the Open Hub
  • ...
    use of OSS increased in 65% of companies in 2016
  • ...
    learn about Open Hub updates and features on the Open Hub blog
About Project Security

Languages

C
93%
CMake
5%
3 Other
2%

30 Day Summary

Mar 23 2024 — Apr 22 2024

12 Month Summary

Apr 22 2023 — Apr 22 2024

Ratings

Be the first to rate this project
Click to add your rating
  
Review this Project!