
C
C Struct
C struct SAMPLE for clangd / highlighter fixtures.
- File
- C · C
- Use case
- Syntax highlighting / Code parsing
Short, known-correct source files in many languages with classes, functions, generics, enums, and error handling, for testing parsers, linters, formatters, language detection, and diff viewers.
Each card starts with one representative test file. Choose a use case, search, or filter to find a specific profile; a card’s variant menu contains its related samples.
161 test families · 229 available files · Page 1 of 9

C
C struct SAMPLE for clangd / highlighter fixtures.

C
The classic hello-world in C (an include, main, and printf) for testing highlighters, C compilers, and parsers against the canonical first program.

C
A realistic C program: a singly linked list with a typedef struct, malloc/free memory management, pointer walking, and error handling, for testing highlighters, compilers, and static analysers.

Csharp
A small C# iterator Fibonacci utility: realistic snippet for language tooling.

Csharp
Idiomatic C# hello-world for syntax highlighters and Roslyn-style parsers.

Csharp
C# LINQ chain SAMPLE for Roslyn fixtures.

C++
C++17 optional SAMPLE for clangd fixtures.

C++
The classic hello-world in C++: iostream and std::cout, for testing highlighters, C++ compilers, and parsers.

C++
A realistic C++ snippet with a class template, STL algorithms (max_element, accumulate), std::move, and range handling, for testing highlighters, g++/clang++, and parsers against real templates.

Clojure
Minimal Clojure hello for CIDER / clj-kondo fixtures.

Clojure
Clojure reduce utility: realistic snippet.

Clojure
Clojure thread-first macro for highlighter tests.

Clojure
Intentionally invalid Clojure (unbalanced forms) for clj-kondo-style tests.

YAML
Tiny SAMPLE tooling config snippet (docker-compose-snippet) for editor/linter harnesses.

JavaScript
Tiny SAMPLE tooling config snippet (eslint-flat-snippet) for editor/linter harnesses.

JSON
Tiny SAMPLE tooling config snippet (prettier-config) for editor/linter harnesses.

Repo Config
An intentionally invalid ownership file carrying five defects that all parse as plausible lines: an owner that is neither a handle nor an email, a team with no organisation, a character class, a negation, and a path with

Merges
What `git show` prints for a merge commit: a `diff --cc` header, an index line naming three blobs, `@@@` hunk markers, and two prefix columns instead of one. The `++` line is the giveaway a reviewer is looking for: conte