Skip to content

Commit a13ce5d

Browse files
committed
common: fix EqDualBerettas.String() spelling error
1 parent fb6996c commit a13ce5d

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

common/equipment.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func initEqElementToName() {
206206
eqElementToName[EqBomb] = "C4"
207207
eqElementToName[EqDeagle] = "Desert Eagle"
208208
eqElementToName[EqDecoy] = "Decoy Grenade"
209-
eqElementToName[EqDualBarettas] = "Dual Barettas"
209+
eqElementToName[EqDualBerettas] = "Dual Berettas"
210210
eqElementToName[EqFamas] = "FAMAS"
211211
eqElementToName[EqFiveSeven] = "Five-SeveN"
212212
eqElementToName[EqFlash] = "Flashbang"

common/equipment_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,18 @@ package common
33
import (
44
"testing"
55

6-
assert "github.com/stretchr/testify/assert"
6+
"github.com/stretchr/testify/assert"
77
)
88

9-
func TestEquipmentElementClass(t *testing.T) {
9+
func TestEquipmentElement_Class(t *testing.T) {
1010
assert.Equal(t, EqClassUnknown, EqUnknown.Class(), "EqUnknown should have the class EqClassUnknown")
1111
assert.Equal(t, EqClassPistols, EqP2000.Class(), "EqP2000 should have the class EqClassPistols")
1212
assert.Equal(t, EqClassPistols, EqRevolver.Class(), "EqRevolver should have the class EqClassPistols")
1313
assert.Equal(t, EqClassRifle, EqG3SG1.Class(), "EqG3SG1 should have the class EqClassRifle")
1414
}
1515

16-
func TestEquipmentClass(t *testing.T) {
17-
assert.Equal(t, EqClassUnknown, NewEquipment(EqUnknown).Class(), "EqUnknown should have the class EqClassUnknown")
18-
assert.Equal(t, EqClassPistols, NewEquipment(EqP2000).Class(), "EqP2000 should have the class EqClassPistols")
19-
assert.Equal(t, EqClassPistols, NewEquipment(EqRevolver).Class(), "EqRevolver should have the class EqClassPistols")
20-
assert.Equal(t, EqClassRifle, NewEquipment(EqG3SG1).Class(), "EqG3SG1 should have the class EqClassRifle")
16+
func TestEquipmentElement_Name(t *testing.T) {
17+
assert.Equal(t, "Dual Berettas", EqDualBerettas.String(), "EqDualBerettas should be named correctly")
2118
}
2219

2320
func TestMapEquipment(t *testing.T) {
@@ -28,10 +25,13 @@ func TestMapEquipment(t *testing.T) {
2825
assert.Equal(t, EqUnknown, MapEquipment("asdf"), "'asdf' should be mapped to EqUnknown")
2926
}
3027

31-
func TestEquipmentUniqueID(t *testing.T) {
32-
assert.NotEqual(t, NewEquipment(EqAK47).UniqueID(), NewEquipment(EqAK47).UniqueID(), "UniqueIDs of different equipment instances should be different")
28+
func TestEquipment_Class(t *testing.T) {
29+
assert.Equal(t, EqClassUnknown, NewEquipment(EqUnknown).Class(), "EqUnknown should have the class EqClassUnknown")
30+
assert.Equal(t, EqClassPistols, NewEquipment(EqP2000).Class(), "EqP2000 should have the class EqClassPistols")
31+
assert.Equal(t, EqClassPistols, NewEquipment(EqRevolver).Class(), "EqRevolver should have the class EqClassPistols")
32+
assert.Equal(t, EqClassRifle, NewEquipment(EqG3SG1).Class(), "EqG3SG1 should have the class EqClassRifle")
3333
}
3434

35-
func TestEquipmentName(t *testing.T) {
36-
assert.Equal(t, "Dual Barettas", EqDualBarettas.String(), "EqDualBarettas should be named correctly")
35+
func TestEquipment_UniqueID(t *testing.T) {
36+
assert.NotEqual(t, NewEquipment(EqAK47).UniqueID(), NewEquipment(EqAK47).UniqueID(), "UniqueIDs of different equipment instances should be different")
3737
}

0 commit comments

Comments
 (0)