Trybuild is a Rust library that provides a test harness for compiler diagnostics, commonly known as UI tests. It allows developers to write test cases that compile Rust source files and assert that the compiler's error messages match expected output stored in `.stderr` files. The library is widely used for testing procedural macros and other compile-time error reporting. The API is minimal: `TestCases::new()`, `.pass(path)`, and `.compile_fail(path)`. Under the hood, trybuild creates a temporary Cargo project for each test suite, compiles each test case individually using `cargo check` or `cargo build`, captures the compiler's JSON output, normalizes file paths and other machine-specific details, and compares the result against saved snapshots. It supports both pass and compile-fail tests, glob patterns, workspace inheritance, path dependencies, and various normalization strategies to keep snapshots stable across environments. The codebase is exceptionally well-structured, with clean separation of concerns, a sophisticated normalization engine that maintains backward compatibility through multiple normalization variations, and robust file locking for concurrent test execution. It is actively maintained by David Tolnay and is a cornerstone of the Rust procedural macro ecosystem.
AccuracyCoin is a comprehensive NES ROM-based test suite designed to verify the accuracy of NES emulators and hardware implementations. Containing 141 individual tests covering CPU instructions, PPU rendering, APU sound, timing behaviors, and hardware quirks, it serves as a valuable tool for emulator developers seeking to ensure their implementations match the behavior of original NES hardware (specifically targeting RP2A03G CPU and RP2C02G PPU revisions). The application features a navigable test menu accessible via standard NES controller inputs, allowing users to select and run specific tests, skip problematic tests, and view detailed pass/fail results with error codes. A distinctive debug menu, activated by the Select button, provides real-time inspection of memory contents including CPU registers and specific RAM regions, facilitating troubleshooting without external debugging tools. Each test is meticulously crafted to isolate specific hardware behaviors, often employing cycle-accurate timing techniques to probe edge cases and timing-dependent phenomena. What sets AccuracyCoin apart is its sophisticated approach to handling hardware variations - many tests acknowledge multiple valid behaviors that different NES revisions or implementations might exhibit, assigning success codes rather than simple pass/fail outcomes. This nuanced verification approach, combined with the comprehensive coverage of NES subsystems and the thoughtful design of the test harness and debug utilities, makes it a standout resource in the NES homebrew and emulator development communities.
This repository defines the Transit data interchange format (v0.8), a cross-language serialization specification for conveying values between applications. It does not contain any implementation code for reading or writing Transit; instead, it provides the authoritative specification (README.md), a comprehensive suite of example data files in multiple representations (EDN, JSON, verbose JSON, MessagePack), and a Clojure-based testing infrastructure to verify that third-party Transit implementations correctly encode/decode according to the spec. The test harness in `src/transit/verify.clj` orchestrates roundtrip tests by invoking external implementation processes (via `bin/verify`), using both hand-crafted corner cases and generative random data to ensure correctness. The repo acts as the central reference for all Transit implementations across languages including Clojure, Java, JavaScript, Python, Ruby, and others.