Files
eventbus2/errors_test.go
werben 570b2638cb code optimization
code optimization
2023-04-21 19:19:17 +08:00

30 lines
436 B
Go

// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2023 werbenhu
// SPDX-FileContributor: werbenhu
package eventbus
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestErrString(t *testing.T) {
c := err{
Msg: "test",
Code: 0x1,
}
require.Equal(t, "test", c.String())
}
func TestErrErrorr(t *testing.T) {
c := err{
Msg: "error",
Code: 0x1,
}
require.Equal(t, "error", error(c).Error())
}