Improve test coverage to ~100%

This commit is contained in:
Leonel Quinteros
2016-06-26 12:15:08 -03:00
parent 2c5ca9c0e6
commit 21c6bc86cb
3 changed files with 52 additions and 33 deletions

View File

@@ -93,6 +93,25 @@ msgstr[0] "Badly formatted string'
} }
} }
func TestTranslationObject(t *testing.T) {
tr := newTranslation()
str := tr.get()
if str != "" {
t.Errorf("Expected '' but got '%s'", str)
}
// Set id
tr.id = "Text"
// Get again
str = tr.get()
if str != "Text" {
t.Errorf("Expected 'Text' but got '%s'", str)
}
}
func TestPoRace(t *testing.T) { func TestPoRace(t *testing.T) {
// Set PO content // Set PO content
str := `# Some comment str := `# Some comment