Skip to content

Commit e771fe1

Browse files
Qiyuanqiiicodex
andcommitted
test: initialize isolated PR follow-up acceptance
Co-authored-by: Codex <codex@openai.com>
0 parents  commit e771fe1

5 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎.github/workflows/acceptance.yml‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: PR follow-up live acceptance
2+
on:
3+
push:
4+
branches: ['Qiyuanqiii/pr-followup-live-head-*']
5+
permissions:
6+
contents: read
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 3
11+
steps:
12+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
13+
- run: go test ./...

‎README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Disposable PR follow-up live acceptance fixture. Isolated base/head branches; never merge into main. The fixed tests and workflow are acceptance oracles.

‎go.mod‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module followupacceptance
2+
3+
go 1.23

‎sum.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package followupacceptance
2+
3+
func Sum(a, b int) int { return a + b }

‎sum_test.go‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package followupacceptance
2+
3+
import "testing"
4+
5+
func TestSum(t *testing.T) {
6+
for _, c := range []struct{ a, b, want int }{{2, 3, 5}, {-2, 3, 1}, {0, 0, 0}} {
7+
if got := Sum(c.a, c.b); got != c.want { t.Errorf("Sum(%d,%d)=%d; want %d", c.a, c.b, got, c.want) }
8+
}
9+
}

0 commit comments

Comments
 (0)