Completed clean root directory structure: - Root now contains only: .git, .env, docs/, orig/ - Moved all remaining files and directories to orig/: - Config files (.claude, .dockerignore, .drone.yml, etc.) - All .env variants (except active .env) - Git config (.gitconfig, .github, .gitignore, etc.) - Tool configs (.golangci.yml, .revive.toml, etc.) - Documentation (*.md files, @prompts) - Build files (Dockerfiles, Makefile, go.mod, go.sum) - Docker compose files - All source directories (scripts, tests, tools, etc.) - Runtime directories (logs, monitoring, reports) - Dependency files (node_modules, lib, cache) - Special files (--delete) - Removed empty runtime directories (bin/, data/) V2 structure is now clean: - docs/planning/ - V2 planning documents - orig/ - Complete V1 codebase preserved - .env - Active environment config (not in git) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.3 KiB
Go
47 lines
1.3 KiB
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestComputeSummaryDefaultVectors(t *testing.T) {
|
|
dataset, err := loadVectors("vectors/default.json")
|
|
if err != nil {
|
|
t.Fatalf("loadVectors: %v", err)
|
|
}
|
|
|
|
summary, err := computeSummary("vectors/default.json", dataset)
|
|
if err != nil {
|
|
t.Fatalf("computeSummary: %v", err)
|
|
}
|
|
|
|
if summary.Attempts != 5 {
|
|
t.Fatalf("expected 5 attempts, got %d", summary.Attempts)
|
|
}
|
|
if summary.Executed != 4 {
|
|
t.Fatalf("expected 4 executed, got %d", summary.Executed)
|
|
}
|
|
if summary.Successful != 3 {
|
|
t.Fatalf("expected 3 successful, got %d", summary.Successful)
|
|
}
|
|
if summary.Failed != 1 {
|
|
t.Fatalf("expected 1 failed, got %d", summary.Failed)
|
|
}
|
|
if summary.GrossProfitETH != "0.101000" {
|
|
t.Fatalf("gross profit mismatch: %s", summary.GrossProfitETH)
|
|
}
|
|
if summary.GasCostETH != "0.013700" {
|
|
t.Fatalf("gas cost mismatch: %s", summary.GasCostETH)
|
|
}
|
|
if summary.NetProfitETH != "0.087300" {
|
|
t.Fatalf("net profit mismatch: %s", summary.NetProfitETH)
|
|
}
|
|
if summary.AverageProfitETH != "0.021825" {
|
|
t.Fatalf("avg profit mismatch: %s", summary.AverageProfitETH)
|
|
}
|
|
if summary.AverageGasCostETH != "0.003425" {
|
|
t.Fatalf("avg gas mismatch: %s", summary.AverageGasCostETH)
|
|
}
|
|
if len(summary.ExchangeBreakdown) != 3 {
|
|
t.Fatalf("expected 3 exchanges, got %d", len(summary.ExchangeBreakdown))
|
|
}
|
|
}
|