go-cmp ist eine Vergleichsbibliothek für Go, die für den Einsatz in Test-Suiten entwickelt wurde. Sie fungiert als rekursives Daten-Differenzierungs- und Assertion-Tool, das bestimmt, ob zwei komplexe Datenstrukturen semantisch gleich sind, anstatt sich auf strikte bitweise Gleichheit zu verlassen.
Die Hauptfunktionen von google/go-cmp sind: Recursive Semantic Equality, Reflection-Based Comparison, Equality Logic Frameworks, Unexported Field Access Control, Comparison Logic Overrides, Custom Equality Definitions, Recursive Data Diffing, Semantic Value Comparison.
Open-Source-Alternativen zu google/go-cmp sind unter anderem: smartystreets/goconvey — GoConvey is a behavioral testing framework for the Go programming language that provides a test runner, a code… chaijs/chai — Chai is an assertion library for Node.js and browser-based JavaScript applications. It functions as both a… sinonjs/sinon — Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit… appleboy/gofight. adamluzsi/testcase. bradleyjkemp/cupaloy.
GoConvey is a behavioral testing framework for the Go programming language that provides a test runner, a code coverage tool, and a web-based monitoring dashboard. It integrates with the standard Go test command to organize tests into behavioral stories and conveyors. The project features a web interface that monitors the file system for source code changes and automatically triggers test execution to provide real-time feedback. This dashboard displays test results, failures, and a chronological history of execution status. The framework includes a state assertion system for verifying values
Chai is an assertion library for Node.js and browser-based JavaScript applications. It functions as both a behavior-driven development and test-driven development framework, providing a system to verify code outputs, application state, and general logic. The project is an extensible validation engine that uses a plugin-based system to allow the registration of custom assertions and specialized data checks. It supports multiple modular assertion styles to accommodate different validation philosophies. The library covers a broad range of data validation capabilities, including the inspection o
Sinon is a JavaScript test double library and mocking framework used to isolate code and verify behavior during unit testing. It provides a collection of spies, stubs, and mocks that replace real function implementations and object methods with controlled substitutes. The project includes a specialized fake timer library for overriding the system clock, allowing the simulation of time progression to trigger timeouts and intervals without waiting for real-time delays. It also features a test sandbox mechanism to group multiple fakes together, ensuring the original state is restored between tes