0
I Use This!
Activity Not Available
Analyzed 3 months ago. based on code collected 5 months 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...

  • ...
    use of OSS increased in 65% of companies in 2016
  • ...
    learn about Open Hub updates and features on the Open Hub blog
  • ...
    55% of companies leverage OSS for production infrastructure
  • ...
    search using multiple tags to find exactly what you need
About Project Security

Languages

C
92%
CMake
5%
3 Other
3%

30 Day Summary

Jan 2 2025 — Feb 1 2025

12 Month Summary

Feb 1 2024 — Feb 1 2025
  • 11 Commits
    Down 0 (0%) from previous 12 months
  • 1 Contributors
    Down 0 (0%) from previous 12 months

Ratings

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