Increment 0: add XCTest target, testing process & 10x value plan
- Add TopManagerTests unit-test target (hosted, @testable import) - 14 baseline tests for formatters and model math (all green) - scripts/test.sh build+test loop driver - docs/TESTING.md (5-gate process), docs/VALUE_PLAN.md (10x rubric) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
25
scripts/test.sh
Executable file
25
scripts/test.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
# Fast build+test loop driver for TopManager.
|
||||
# Usage:
|
||||
# scripts/test.sh build # compile only (fast gate)
|
||||
# scripts/test.sh test # compile + run unit tests
|
||||
# scripts/test.sh # same as "test"
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
ACTION="${1:-test}"
|
||||
DEST='platform=macOS,arch=arm64'
|
||||
COMMON=(-project TopManager.xcodeproj -scheme TopManager -configuration Debug -destination "$DEST" CODE_SIGNING_ALLOWED=NO)
|
||||
|
||||
case "$ACTION" in
|
||||
build)
|
||||
xcodebuild "${COMMON[@]}" build 2>&1 | tail -20
|
||||
;;
|
||||
test)
|
||||
xcodebuild "${COMMON[@]}" test 2>&1 \
|
||||
| grep -E "Test Suite|Executed|error:|warning:.*unused|BUILD|TEST (SUCCEEDED|FAILED)|failed \(" \
|
||||
| tail -40
|
||||
;;
|
||||
*)
|
||||
echo "unknown action: $ACTION" >&2; exit 2 ;;
|
||||
esac
|
||||
Reference in New Issue
Block a user