awesome-repositories.com
博客
MCP
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
ThrowTheSwitch avatar

ThrowTheSwitch/Unity

0
View on GitHub↗
5,265 星标·1,115 分支·C·MIT·10 次浏览ThrowTheSwitch.org↗

Unity

Unity 是一个用于 C 语言的轻量级单元测试框架,提供了验证代码正确性所需的断言库、测试运行器和报告机制。它作为在 C 环境中组织和执行单元测试的核心测试基础设施。

该框架专为系统级和嵌入式软件验证而设计,具有验证固件和硬件驱动程序的特定功能。它专注于内存完整性和指针有效性,允许验证指针状态并检查原始内存块。

该工具集涵盖了广泛的比较类型,包括针对整数、位模式和浮点值的数值验证。它还提供用于验证以空字符结尾的字符串、数组内容和布尔逻辑的实用程序,同时支持自定义失败消息以在调试期间提供上下文。

Features

  • C++ Unit Testing - Provides a lightweight framework for writing and running unit tests for C functions.
  • Assertion Macros - Uses assertion macros to capture file and line metadata during test failures.
  • C Assertion Libraries - Ships a collection of macros for comparing integers, strings, and memory blocks with descriptive failure messages.
  • Embedded Software Validation - Verifies the correctness of firmware and hardware drivers by testing memory blocks and bit patterns.
  • Embedded Test Runners - Provides a minimal test runner that can be integrated into C binaries to execute unit tests.
  • Unit Testing Frameworks - Provides a lightweight library for verifying C code correctness through assertion macros and failure reports.
  • Data Comparison - Performs raw byte-by-byte comparisons of memory segments for non-convertible data types.
  • Epsilon-Based Type Comparators - Provides epsilon-based comparisons to handle floating-point precision errors during test assertions.
  • Memory Integrity Testing - Checks for null pointers and compares raw memory segments to ensure data integrity.
  • Bit Status Checkers - Checks if specific bits or masked ranges in an integer are set to verify hardware flags.
  • Null Value Validation - Verifies whether a memory pointer is null or non-null to ensure reference validity.
  • Array Content Verifications - Compares multiple array elements against another array or a single expected value.
  • Binary Memory Comparisons - Performs raw binary equality checks between memory blocks to validate complex data structures.
  • Bit Pattern Verifications - Provides macros to verify the state of hardware flags or packed integers using bitmask-based inspections.
  • Conditional Logic Evaluation - Evaluates boolean conditions and marks tests as failures if results differ from expected truth values.
  • Boolean Logic Assertions - Implements logic to evaluate expressions and trigger test failures when actual boolean results deviate from expectations.
  • Floating Point Comparisons - Provides epsilon-based floating point comparisons to verify numerical correctness in unit tests.
  • Assertion Message Customizers - Allows users to append descriptive context to assertion failures for improved debugging.
  • Integer Comparisons - Provides assertion macros to check equality and threshold requirements for integer values.
  • Null-Terminated String Verifications - Compares character sequences by iterating through memory until a null terminator or length limit is reached.
  • String Comparisons - Verifies that null-terminated strings are identical or match for a specific character count.
  • 构建系统 - A simple unit testing framework for C.
  • Embedded Software Libraries - Lightweight unit testing framework for embedded systems.
  • Embedded Utility Libraries - Lightweight unit testing framework for embedded systems.
  • Testing and Debugging - Simple unit testing for C.

Star 历史

throwtheswitch/unity 的 Star 历史图表throwtheswitch/unity 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

throwtheswitch/unity 是做什么的?

Unity 是一个用于 C 语言的轻量级单元测试框架,提供了验证代码正确性所需的断言库、测试运行器和报告机制。它作为在 C 环境中组织和执行单元测试的核心测试基础设施。

throwtheswitch/unity 的主要功能有哪些?

throwtheswitch/unity 的主要功能包括:C++ Unit Testing, Assertion Macros, C Assertion Libraries, Embedded Software Validation, Embedded Test Runners, Unit Testing Frameworks, Data Comparison, Epsilon-Based Type Comparators。

throwtheswitch/unity 有哪些开源替代品?

throwtheswitch/unity 的开源替代品包括: doctest/doctest — doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation… thomhurst/tunit — TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source… google/googletest — This project is a comprehensive C++ unit testing framework designed to verify code logic and identify regressions… protobuf-c/protobuf-c — Protocol Buffers implementation in C. philsquared/catch — Catch is a C++ testing toolset providing frameworks for unit testing, behavior-driven development, and… onqtam/doctest — doctest is a unit testing framework and assertion library for C++ delivered as a single-header library. It provides a…

Unity 的开源替代方案

相似的开源项目,按与 Unity 的功能重合度排序。
  • thomhurst/tunitthomhurst 的头像

    thomhurst/TUnit

    3,744在 GitHub 上查看↗

    TUnit is a comprehensive C# testing framework, mocking library, and fluent assertion tool. It utilizes source generation for test discovery and mock creation, ensuring compatibility with Native AOT and IL trimming by eliminating the need for runtime reflection and proxies. The framework provides specialized capabilities for integration testing, including the management of distributed application lifecycles, isolated database schemas, and the correlation of telemetry and logs across process boundaries via OTLP. It also includes an HTTP testing utility to intercept network exchanges and mock AP

    C#csharpdotnettest
    在 GitHub 上查看↗3,744
  • doctest/doctestdoctest 的头像

    doctest/doctest

    6,765在 GitHub 上查看↗

    doctest is a lightweight C++ unit testing framework and assertion library. It provides a single-header implementation that eliminates complex build dependencies, allowing developers to write and execute test cases directly within their source code. The framework is distinguished by its focus on compile-time performance and binary overhead. It uses conditional compilation guards to strip all testing logic and metadata from production binaries. Additionally, it features hierarchical subcases that re-execute parent setup code to isolate different execution paths within a single test case. Its c

    C++c-plus-pluscppcpp11
    在 GitHub 上查看↗6,765
  • google/googletestgoogle 的头像

    google/googletest

    38,713在 GitHub 上查看↗

    This project is a comprehensive C++ unit testing framework designed to verify code logic and identify regressions through a suite of assertion macros, test fixtures, and execution runners. It automates the discovery and registration of test cases during static initialization, allowing developers to define isolated test environments that ensure repeatable and predictable conditions for every execution. The framework distinguishes itself through a sophisticated mock object library that enables the simulation of components and the enforcement of strict interaction requirements. By intercepting v

    C++
    在 GitHub 上查看↗38,713
  • protobuf-c/protobuf-cprotobuf-c 的头像

    protobuf-c/protobuf-c

    2,973在 GitHub 上查看↗

    Protocol Buffers implementation in C

    C++
    在 GitHub 上查看↗2,973
  • 查看 Unity 的所有 30 个替代方案→