Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4BL3cEPHQTk2McE7C
23 lines
1.0 KiB
Bash
Executable File
23 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Regenerates every file in output/. All outputs are deterministic EXCEPT 10-cost.txt (timing, indicative only).
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")/.."
|
|
mvn -q -B compile
|
|
run() { java -Dstdout.encoding=UTF-8 -cp target/classes "com.ankurm.copying.$1" 2>&1 | grep -v '^Picked up JAVA_TOOL_OPTIONS' > "output/$2.txt"; }
|
|
run ShallowVsDeepDemo 01-shallow-vs-deep
|
|
scripts/broken.sh > /dev/null
|
|
run CloneDemo 03-clone
|
|
run CopyConstructorDemo 04-copy-constructor
|
|
run SerializationCopyDemo 05-serialization
|
|
run RecordCopyDemo 06-records
|
|
run DefensiveCopyDemo 07-defensive
|
|
run CollectionCopyDemo 08-collections
|
|
run CopyOfIdentityDemo 11-copyof-identity
|
|
run GraphCopyDemo 12-graph-copy
|
|
run SerializationRulesDemo 13-serialization-rules
|
|
run RecordArrayDemo 14-record-arrays
|
|
run DefensiveCloneDemo 15-defensive-clone
|
|
mvn -B test 2>&1 | grep -E 'Tests run|BUILD|ERROR|FAIL' | grep -v 'Picked up' > output/09-tests.txt
|
|
run CopyCostDemo 10-cost
|
|
echo "regenerated:"; ls output
|