Explorar el Código

Fix bug in date test

DamianSzkuat hace 7 años
padre
commit
e696c4a8ab
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      stream_style_test.go

+ 5 - 1
stream_style_test.go

@@ -466,8 +466,12 @@ func (s *StreamStyleSuite) TestDates(t *C) {
 	if int(month) < 10 {
 		monthString = "0" + monthString
 	}
+	dayString := strconv.Itoa(day)
+	if day < 10 {
+		dayString = "0" + dayString
+	}
 	expectedWorkbookDataStrings[0][1] = append(expectedWorkbookDataStrings[0][1],
-		monthString+"-"+strconv.Itoa(day)+"-"+strconv.Itoa(year-2000))
+		monthString+"-"+dayString+"-"+strconv.Itoa(year-2000))
 
 	if !reflect.DeepEqual(actualWorkbookData, expectedWorkbookDataStrings) {
 		t.Fatal("Expected workbook data to be equal")