Skip to content

Commit

Permalink
Fix according to golang/go#44614
Browse files Browse the repository at this point in the history
  • Loading branch information
leoleoasd committed Feb 27, 2021
1 parent 204fd4b commit 9188fc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controller/submission_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const (
submitter
)

func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) (submission models.Submission) {
func createSubmissionForTest(t *testing.T, name string, id int, problem *models.Problem, user *models.User, code *fileContent, testCaseCount int) models.Submission {
for i := 0; i < testCaseCount; i++ {
createTestCaseForTest(t, *problem, testCaseData{
Score: 0,
Expand All @@ -33,7 +33,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models.
})
}
problem.LoadTestCases()
submission = models.Submission{
submission := models.Submission{
UserID: user.ID,
User: user,
ProblemID: problem.ID,
Expand Down Expand Up @@ -72,7 +72,7 @@ func createSubmissionForTest(t *testing.T, name string, id int, problem *models.
_, err = code.reader.Seek(0, io.SeekStart)
assert.NoError(t, err)
}
return
return submission
}

func TestCreateSubmission(t *testing.T) {
Expand Down

0 comments on commit 9188fc2

Please sign in to comment.