-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring: переход на testify в тестах для удобства
- Loading branch information
1 parent
4ec14da
commit 12736fd
Showing
22 changed files
with
193 additions
and
520 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
package egts | ||
|
||
import ( | ||
"github.com/stretchr/testify/assert" | ||
"testing" | ||
) | ||
|
||
func Test_crc8(t *testing.T) { | ||
crc := crc8([]byte("123456789")) | ||
checkVal := byte(0xF7) | ||
|
||
if crc != checkVal { | ||
t.Errorf("Incorrect value: %x != %x\n", crc, checkVal) | ||
} | ||
assert.Equal(t, crc, checkVal) | ||
} | ||
|
||
func Test_crc16(t *testing.T) { | ||
crc := crc16([]byte("123456789")) | ||
checkVal := uint16(0x29b1) | ||
|
||
if crc != checkVal { | ||
t.Errorf("Incorrect value: %x != %x\n", crc, checkVal) | ||
} | ||
assert.Equal(t, crc, checkVal) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.