Cursor rule
.cursor/rules/testing.mdcTesting guidelines and patterns for skia-rs
Cursor rules
Quality
69/100
Scores the file, not the repository.Length
155 words
8 headings · 3 code blocksRepository
28
— · pushed 21 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Testing Guidelines89## Unit Tests1011- Place tests in the same file as the code12- Test edge cases and error conditions13- Use property-based testing with `proptest` for numeric code1415```rust16#[cfg(test)]17mod tests {18 use super::*;1920 #[test]21 fn point_addition() {22 let p1 = Point::new(1.0, 2.0);23 let p2 = Point::new(3.0, 4.0);24 assert_eq!(p1 + p2, Point::new(4.0, 6.0));25 }26}27```2829## Property Testing3031```rust32use proptest::prelude::*;3334proptest! {35 #[test]36 fn matrix_identity_preserves_point(x in -1000.0f32..1000.0, y in -1000.0f32..1000.0) {37 let p = Point::new(x, y);38 let result = Matrix::IDENTITY.map_point(p);39 prop_assert!((result.x - p.x).abs() < 1e-6);40 prop_assert!((result.y - p.y).abs() < 1e-6);41 }42}43```4445## Conformance Testing4647- Compare output against Skia reference implementation48- Use the `skia/` submodule for reference49- Document any intentional behavioral differences5051## Running Tests5253```bash54# Run all tests55cargo test --workspace5657# Run tests for a specific crate58cargo test -p skia-rs-core5960# Run with output61cargo test --workspace -- --nocapture62```63
Also in quinnjr/skia-rs
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| quinnjr/skia-rs.cursor/rules/api-design.mdc · 28 | Cursor rules | buildstyleapi | 58/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/ffi.mdc · 28 | Cursor rules | typesapi | 45/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/architecture.mdc · 28 | Cursor rules | archdependenciesmonorepo | 62/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/benchmarking.mdc · 28 | Cursor rules | styleperformance | 69/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/code-style.mdc · 28 | Cursor rules | styletypesperformancedeployment+1 | 62/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/commands.mdc · 28 | Cursor rules | buildtestlint-formatgit+4 | 82/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/fuzzing.mdc · 28 | Cursor rules | setupstyle | 69/100 | 3 days ago | |
| quinnjr/skia-rs.cursor/rules/gpu.mdc · 28 | Cursor rules | no sections | 36/100 | 3 days ago |
Diff against .cursor/rules/api-design.mdc Diff against .cursor/rules/ffi.mdc Diff against .cursor/rules/architecture.mdc Diff against .cursor/rules/benchmarking.mdc Diff against .cursor/rules/code-style.mdc Diff against .cursor/rules/commands.mdc Diff against .cursor/rules/fuzzing.mdc Diff against .cursor/rules/gpu.mdc
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
