diff options
Diffstat (limited to 'telegram/client_test.go')
-rw-r--r-- | telegram/client_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/telegram/client_test.go b/telegram/client_test.go new file mode 100644 index 0000000..4c757e1 --- /dev/null +++ b/telegram/client_test.go @@ -0,0 +1,19 @@ +package telegram + +import ( + "testing" +) + +func TestLogInfo(t *testing.T) { + tdlibConstant := stringToLogConstant(":info") + if tdlibConstant != 3 { + t.Errorf("Wrong TDlib constant for info") + } +} + +func TestLogInvalid(t *testing.T) { + tdlibConstant := stringToLogConstant("ziz") + if tdlibConstant != 0 { + t.Errorf("Unknown strings should return fatal loglevel") + } +} |