Swap argument order to expected: actual: are correct
This commit is contained in:
parent
8daced40a1
commit
a4fdcaab68
|
@ -17,7 +17,7 @@ func TestSymbolAlreadyExists(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about a duplicate symbol.
|
||||
d := errors.SymbolAlreadyExists
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestBadMissingMufile(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about a missing Mufile.
|
||||
d := errors.MissingMufile
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, fmt.Sprintf(d.Message, sink.Pwd)),
|
||||
|
@ -29,7 +29,7 @@ func TestBadMufileCasing(t *testing.T) {
|
|||
|
||||
// Check that the compiler warned about a bad Mufile casing (mu.yaml).
|
||||
d := errors.WarnIllegalMufileCasing
|
||||
assert.Equal(t, sink.Warnings(), 1, "expected a single warning")
|
||||
assert.Equal(t, 1, sink.Warnings(), "expected a single warning")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkWarningPrefix, diag.DefaultSinkIDPrefix, d.ID, "mu.yaml", d.Message),
|
||||
|
@ -41,7 +41,7 @@ func TestBadMufileExt1(t *testing.T) {
|
|||
|
||||
// Check that the compiler warned about a bad Mufile extension (none).
|
||||
d := errors.WarnIllegalMufileExt
|
||||
assert.Equal(t, sink.Warnings(), 1, "expected a single warning")
|
||||
assert.Equal(t, 1, sink.Warnings(), "expected a single warning")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkWarningPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu", fmt.Sprintf(d.Message, "")),
|
||||
|
@ -53,7 +53,7 @@ func TestBadMufileExt2(t *testing.T) {
|
|||
|
||||
// Check that the compiler warned about a bad Mufile extension (".txt").
|
||||
d := errors.WarnIllegalMufileExt
|
||||
assert.Equal(t, sink.Warnings(), 1, "expected a single warning")
|
||||
assert.Equal(t, 1, sink.Warnings(), "expected a single warning")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkWarningPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.txt", fmt.Sprintf(d.Message, ".txt")),
|
||||
|
|
|
@ -17,7 +17,7 @@ func TestBadMissingStackName(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about a missing Stack name.
|
||||
d := errors.MissingMetadataName
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
@ -30,7 +30,7 @@ func TestBadStackSemVer1(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about an illegal semantic version.
|
||||
d := errors.IllegalMetadataSemVer
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
@ -43,7 +43,7 @@ func TestBadStackSemVer2(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about an illegal semantic version.
|
||||
d := errors.IllegalMetadataSemVer
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
@ -56,7 +56,7 @@ func TestBadDepSemVer1(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about an illegal semantic version.
|
||||
d := errors.IllegalDependencySemVer
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
@ -69,7 +69,7 @@ func TestBadDepSemVer2(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about an illegal semantic version.
|
||||
d := errors.IllegalDependencySemVer
|
||||
assert.Equal(t, sink.Errors(), 1, "expected a single error")
|
||||
assert.Equal(t, 1, sink.Errors(), "expected a single error")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
@ -82,7 +82,7 @@ func TestBadDepSemVer3(t *testing.T) {
|
|||
|
||||
// Check that the compiler complained about an illegal semantic version.
|
||||
d := errors.IllegalDependencySemVer
|
||||
assert.Equal(t, sink.Errors(), 4, "expected an error for each bad semver")
|
||||
assert.Equal(t, 4, sink.Errors(), "expected an error for each bad semver")
|
||||
assert.Equal(t,
|
||||
fmt.Sprintf("%v: %v%v: %v: %v\n",
|
||||
diag.DefaultSinkErrorPrefix, diag.DefaultSinkIDPrefix, d.ID, "Mu.yaml",
|
||||
|
|
Loading…
Reference in a new issue