You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .codebuddy/CODEBUDDY.md
+17-26Lines changed: 17 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This file provides guidance to CodeBuddy Code when working with code in this rep
8
8
9
9
libpag is a real-time rendering library for PAG (Portable Animated Graphics) files. It renders vector and raster animations across iOS, Android, macOS, Windows, Linux, OpenHarmony, and Web platforms.
10
10
11
-
### Key Directories
11
+
### Source Structure
12
12
13
13
| Directory | Purpose |
14
14
|-----------|---------|
@@ -20,6 +20,8 @@ libpag is a real-time rendering library for PAG (Portable Animated Graphics) fil
File extensions: `.h` (headers), `.cpp` (implementation), `.mm` (Objective-C++). Source files are auto-collected via `file(GLOB)` - no CMake changes needed for new files.
Run this before every commit. Ignore any error output - the script completes formatting regardless of reported errors.
76
72
77
-
Run before committing. Ignore output errors - the formatting completes regardless.
78
73
79
74
## Testing
80
75
81
76
- Location: `/test/src/*Test.cpp`, based on Google Test framework
82
77
- Test code can access all private members via compile flags (no friend class needed)
83
78
79
+
### Run Tests
80
+
```bash
81
+
./cmake-build-debug/PAGFullTest # Run all tests
82
+
./cmake-build-debug/PAGFullTest --gtest_filter=CanvasTest.drawRect # Run specific test
83
+
./cmake-build-debug/PAGFullTest --gtest_filter=Canvas*# Run pattern match
84
+
```
85
+
84
86
### Screenshot Tests
85
87
86
88
- Use `Baseline::Compare(pixels, key)` where key format is `{folder}/{name}`, e.g., `PAGSurfaceTest/Mask`
@@ -92,15 +94,4 @@ Run before committing. Ignore output errors - the formatting completes regardles
92
94
- To accept screenshot changes, copy `test/out/version.json` to `test/baseline/`, **but MUST satisfy both**:
93
95
- Use `version.json` output from running ALL test cases in `PAGFullTest`, never use partial test output
94
96
- User explicitly confirms accepting all screenshot changes
95
-
-`UpdateBaseline` or `update_baseline.sh` syncs `test/baseline/version.json` to `.cache/` and generates local baseline cache. CMake warns when version.json files differ. **NEVER run this command automatically**
96
-
97
-
## Key CMake Options
98
-
99
-
-`-DPAG_BUILD_TESTS=ON`: Enable test targets (required for full module compilation)
100
-
-`-DCMAKE_BUILD_TYPE=Debug`: Debug build with profiling enabled
- Source files auto-collected via `file(GLOB)` - no CMake changes needed for new files
97
+
-`UpdateBaseline` or `update_baseline.sh` syncs `test/baseline/version.json` to `.cache/` and generates local baseline cache. CMake warns when version.json files differ. **NEVER run this command automatically**
0 commit comments