awesome-repositories.com
Blog
awesome-repositories.com

Entdecke die besten Open-Source-Repositories mit KI-gestützter Suche.

EntdeckenKuratierte SuchenOpen-Source-AlternativenSelf-hosted SoftwareBlogSitemap
ProjektÜber unsRanking-MethodikPresseMCP-Server
RechtlichesDatenschutzAGB
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
google avatar

google/go-cmp

0
View on GitHub↗
4,651 Stars·224 Forks·Go·BSD-3-Clause·2 Aufrufe

Go Cmp

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 Bibliothek bietet ein Framework zur Definition spezialisierter Vergleichslogik, das es Benutzern ermöglicht, benutzerdefinierte Gleichheits-Overrides für spezifische Typen zu registrieren. Sie enthält Mechanismen zur Verwaltung der Handhabung nicht exportierter Felder während der Traversierung, um Laufzeit-Panics bei Deep-Equality-Checks zu verhindern.

Das System nutzt reflektionsbasierte Wert-Traversierung, um spezifische Diskrepanzen zwischen erwarteten und tatsächlichen Werten zu identifizieren und detaillierte Unterschiede zu liefern, wenn Werte nicht übereinstimmen. Sie unterstützt typspezifisches Gleichheits-Dispatching und konfigurierbares Vergleichsverhalten.

Features

  • Recursive Semantic Equality - Determines if two complex data structures are semantically equal by recursively comparing their components.
  • Reflection-Based Comparison - Uses Go reflection to recursively walk through complex data structures for deep equality checks.
  • Equality Logic Frameworks - Provides a configurable framework for implementing specialized comparison logic and handling unexported fields.
  • Unexported Field Access Control - Manages reflection access to unexported fields to prevent runtime panics during deep equality checks.
  • Comparison Logic Overrides - Provides a framework for registering custom functions to replace default equality logic for specific types.
  • Custom Equality Definitions - Allows the definition of custom comparison functions to handle special cases like floating-point tolerances.
  • Recursive Data Diffing - Traverses Go types recursively to identify and produce detailed mismatches between expected and actual values.
  • Semantic Value Comparison - Determines if two values are semantically equal by recursively comparing primitive types or applying specialized logic.
  • Go Testing Frameworks - Serves as a specialized assertion tool for Go that generates detailed diffs between expected and actual values.
  • Private Field Comparison Controls - Provides capabilities to manage whether unexported fields are included in value comparisons during testing.
  • Unexported Field Handling - Manages how private struct fields are treated during comparison to prevent panics in Go test suites.
  • Value Comparison Libraries - Compares complex Go data structures in tests using semantic equality instead of strict bitwise equality.
  • Object Equality Implementations - Supports defining specific equality methods on types to control how their equality is calculated.
  • Special Type Equality Handlers - Routes comparison logic to special handlers based on the concrete type of the values.
  • Functional Options - Implements the functional options pattern to configure complex comparison settings via variadic functions.
  • Custom Assertions - Enables specialized equality rules for types to handle business logic or floating point precision during verification.
  • Unit Testing - Facilitates the verification of complex data structures within Go unit tests.
  • Testing and QA - Package for comparing Go values in tests.
  • Testing and Quality Assurance - Package for deep comparison of Go values.
  • Test-Frameworks - Package for comparing Go values in tests.

Star-Verlauf

Star-Verlauf für google/go-cmpStar-Verlauf für google/go-cmp

KI-Suche

Entdecke weitere awesome Repositories

Beschreibe in einfachen Worten, was du brauchst — die KI bewertet tausende kuratierte Open-Source-Projekte nach Relevanz.

Start searching with AI

Häufig gestellte Fragen

Was macht google/go-cmp?

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.

Was sind die Hauptfunktionen von google/go-cmp?

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.

Welche Open-Source-Alternativen gibt es zu google/go-cmp?

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.

Open-Source-Alternativen zu Go Cmp

Ähnliche Open-Source-Projekte, sortiert nach der Anzahl der gemeinsamen Funktionen mit Go Cmp.
  • smartystreets/goconveyAvatar von smartystreets

    smartystreets/goconvey

    8,415Auf GitHub ansehen↗

    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

    Go
    Auf GitHub ansehen↗8,415
  • chaijs/chaiAvatar von chaijs

    chaijs/chai

    8,264Auf GitHub ansehen↗

    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

    JavaScript
    Auf GitHub ansehen↗8,264
  • sinonjs/sinonAvatar von sinonjs

    sinonjs/sinon

    9,753Auf GitHub ansehen↗

    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

    JavaScript
    Auf GitHub ansehen↗9,753
  • bradleyjkemp/cupaloyB

    bradleyjkemp/cupaloy

    0Auf GitHub ansehen↗
    Auf GitHub ansehen↗0
  • Alle 30 Alternativen zu Go Cmp anzeigen→