Skip to content

Commit 21b939f

Browse files
committed
update smoke tests
1 parent 2830413 commit 21b939f

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

tests/all-fail/expected_results.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,55 @@
55
{
66
"name": "TestLeapYears/ year not divisible by 4 in common year",
77
"status": "fail",
8-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
8+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year not divisible by 4 in common year\",\n\t\tyear: 2015,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
99
"message": "\n=== RUN TestLeapYears/year_not_divisible_by_4_in_common_year\n\n leap_test.go:10: IsLeapYear(2015) = true, want false\n\n--- FAIL: TestLeapYears/year_not_divisible_by_4_in_common_year (0.00s)\n"
1010
},
1111
{
1212
"name": "TestLeapYears/ year divisible by 2, not divisible by 4 in common year",
1313
"status": "fail",
14-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
14+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 2, not divisible by 4 in common year\",\n\t\tyear: 1970,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
1515
"message": "\n=== RUN TestLeapYears/year_divisible_by_2,_not_divisible_by_4_in_common_year\n\n leap_test.go:10: IsLeapYear(1970) = true, want false\n\n--- FAIL: TestLeapYears/year_divisible_by_2,_not_divisible_by_4_in_common_year (0.00s)\n"
1616
},
1717
{
1818
"name": "TestLeapYears/ year divisible by 4, not divisible by 100 in leap year",
1919
"status": "fail",
20-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
20+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 4, not divisible by 100 in leap year\",\n\t\tyear: 1996,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
2121
"message": "\n=== RUN TestLeapYears/year_divisible_by_4,_not_divisible_by_100_in_leap_year\n\n leap_test.go:10: IsLeapYear(1996) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_4,_not_divisible_by_100_in_leap_year (0.00s)\n"
2222
},
2323
{
2424
"name": "TestLeapYears/ year divisible by 4 and 5 is still a leap year",
2525
"status": "fail",
26-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
26+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 4 and 5 is still a leap year\",\n\t\tyear: 1960,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
2727
"message": "\n=== RUN TestLeapYears/year_divisible_by_4_and_5_is_still_a_leap_year\n\n leap_test.go:10: IsLeapYear(1960) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_4_and_5_is_still_a_leap_year (0.00s)\n"
2828
},
2929
{
3030
"name": "TestLeapYears/ year divisible by 100, not divisible by 400 in common year",
3131
"status": "fail",
32-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
32+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 100, not divisible by 400 in common year\",\n\t\tyear: 2100,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
3333
"message": "\n=== RUN TestLeapYears/year_divisible_by_100,_not_divisible_by_400_in_common_year\n\n leap_test.go:10: IsLeapYear(2100) = true, want false\n\n--- FAIL: TestLeapYears/year_divisible_by_100,_not_divisible_by_400_in_common_year (0.00s)\n"
3434
},
3535
{
3636
"name": "TestLeapYears/ year divisible by 100 but not by 3 is still not a leap year",
3737
"status": "fail",
38-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
38+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 100 but not by 3 is still not a leap year\",\n\t\tyear: 1900,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
3939
"message": "\n=== RUN TestLeapYears/year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year\n\n leap_test.go:10: IsLeapYear(1900) = true, want false\n\n--- FAIL: TestLeapYears/year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year (0.00s)\n"
4040
},
4141
{
4242
"name": "TestLeapYears/ year divisible by 400 is leap year",
4343
"status": "fail",
44-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
44+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 400 is leap year\",\n\t\tyear: 2000,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
4545
"message": "\n=== RUN TestLeapYears/year_divisible_by_400_is_leap_year\n\n leap_test.go:10: IsLeapYear(2000) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_400_is_leap_year (0.00s)\n"
4646
},
4747
{
4848
"name": "TestLeapYears/ year divisible by 400 but not by 125 is still a leap year",
4949
"status": "fail",
50-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
50+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 400 but not by 125 is still a leap year\",\n\t\tyear: 2400,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
5151
"message": "\n=== RUN TestLeapYears/year_divisible_by_400_but_not_by_125_is_still_a_leap_year\n\n leap_test.go:10: IsLeapYear(2400) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_400_but_not_by_125_is_still_a_leap_year (0.00s)\n"
5252
},
5353
{
5454
"name": "TestLeapYears/ year divisible by 200, not divisible by 400 in common year",
5555
"status": "fail",
56-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
56+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 200, not divisible by 400 in common year\",\n\t\tyear: 1800,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
5757
"message": "\n=== RUN TestLeapYears/year_divisible_by_200,_not_divisible_by_400_in_common_year\n\n leap_test.go:10: IsLeapYear(1800) = true, want false\n\n--- FAIL: TestLeapYears/year_divisible_by_200,_not_divisible_by_400_in_common_year (0.00s)\n"
5858
}
5959
]

tests/partial-fail/expected_results.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,55 @@
55
{
66
"name": "TestLeapYears/ year not divisible by 4 in common year",
77
"status": "pass",
8-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
8+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year not divisible by 4 in common year\",\n\t\tyear: 2015,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
99
"message": "\n=== RUN TestLeapYears/year_not_divisible_by_4_in_common_year\n\n--- PASS: TestLeapYears/year_not_divisible_by_4_in_common_year (0.00s)\n"
1010
},
1111
{
1212
"name": "TestLeapYears/ year divisible by 2, not divisible by 4 in common year",
1313
"status": "pass",
14-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
14+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 2, not divisible by 4 in common year\",\n\t\tyear: 1970,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
1515
"message": "\n=== RUN TestLeapYears/year_divisible_by_2,_not_divisible_by_4_in_common_year\n\n--- PASS: TestLeapYears/year_divisible_by_2,_not_divisible_by_4_in_common_year (0.00s)\n"
1616
},
1717
{
1818
"name": "TestLeapYears/ year divisible by 4, not divisible by 100 in leap year",
1919
"status": "pass",
20-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
20+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 4, not divisible by 100 in leap year\",\n\t\tyear: 1996,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
2121
"message": "\n=== RUN TestLeapYears/year_divisible_by_4,_not_divisible_by_100_in_leap_year\n\n--- PASS: TestLeapYears/year_divisible_by_4,_not_divisible_by_100_in_leap_year (0.00s)\n"
2222
},
2323
{
2424
"name": "TestLeapYears/ year divisible by 4 and 5 is still a leap year",
2525
"status": "pass",
26-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
26+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 4 and 5 is still a leap year\",\n\t\tyear: 1960,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
2727
"message": "\n=== RUN TestLeapYears/year_divisible_by_4_and_5_is_still_a_leap_year\n\n--- PASS: TestLeapYears/year_divisible_by_4_and_5_is_still_a_leap_year (0.00s)\n"
2828
},
2929
{
3030
"name": "TestLeapYears/ year divisible by 100, not divisible by 400 in common year",
3131
"status": "pass",
32-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
32+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 100, not divisible by 400 in common year\",\n\t\tyear: 2100,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
3333
"message": "\n=== RUN TestLeapYears/year_divisible_by_100,_not_divisible_by_400_in_common_year\n\n--- PASS: TestLeapYears/year_divisible_by_100,_not_divisible_by_400_in_common_year (0.00s)\n"
3434
},
3535
{
3636
"name": "TestLeapYears/ year divisible by 100 but not by 3 is still not a leap year",
3737
"status": "pass",
38-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
38+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 100 but not by 3 is still not a leap year\",\n\t\tyear: 1900,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
3939
"message": "\n=== RUN TestLeapYears/year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year\n\n--- PASS: TestLeapYears/year_divisible_by_100_but_not_by_3_is_still_not_a_leap_year (0.00s)\n"
4040
},
4141
{
4242
"name": "TestLeapYears/ year divisible by 400 is leap year",
4343
"status": "fail",
44-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
44+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 400 is leap year\",\n\t\tyear: 2000,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
4545
"message": "\n=== RUN TestLeapYears/year_divisible_by_400_is_leap_year\n\n leap_test.go:10: IsLeapYear(2000) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_400_is_leap_year (0.00s)\n"
4646
},
4747
{
4848
"name": "TestLeapYears/ year divisible by 400 but not by 125 is still a leap year",
4949
"status": "fail",
50-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
50+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 400 but not by 125 is still a leap year\",\n\t\tyear: 2400,\n\t\texpected: true,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
5151
"message": "\n=== RUN TestLeapYears/year_divisible_by_400_but_not_by_125_is_still_a_leap_year\n\n leap_test.go:10: IsLeapYear(2400) = false, want true\n\n--- FAIL: TestLeapYears/year_divisible_by_400_but_not_by_125_is_still_a_leap_year (0.00s)\n"
5252
},
5353
{
5454
"name": "TestLeapYears/ year divisible by 200, not divisible by 400 in common year",
5555
"status": "pass",
56-
"test_code": "func TestLeapYears(t *testing.T) {\n\tfor _, tc := range testCases {\n\t\tt.Run(tc.description, func(t *testing.T) {\n\t\t\tactual := IsLeapYear(tc.year)\n\t\t\tif actual != tc.expected {\n\t\t\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t\t\t}\n\t\t})\n\t}\n}",
56+
"test_code": "func TestLeapYears(t *testing.T) {\n\ttc := struct {\n\t\tdescription string\n\t\tyear int\n\t\texpected bool\n\t}{\n\t\tdescription: \"year divisible by 200, not divisible by 400 in common year\",\n\t\tyear: 1800,\n\t\texpected: false,\n\t}\n\n\tactual := IsLeapYear(tc.year)\n\tif actual != tc.expected {\n\t\tt.Fatalf(\"IsLeapYear(%d) = %t, want %t\", tc.year, actual, tc.expected)\n\t}\n\n}",
5757
"message": "\n=== RUN TestLeapYears/year_divisible_by_200,_not_divisible_by_400_in_common_year\n\n--- PASS: TestLeapYears/year_divisible_by_200,_not_divisible_by_400_in_common_year (0.00s)\n"
5858
}
5959
]

0 commit comments

Comments
 (0)