diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-11-16 16:05:23 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-11-16 16:05:23 +0300 |
commit | dcb802358b8f7d8a72da04cce71b2dcc0f6a2fbc (patch) | |
tree | e91ded403ca90db70bc07c24acc07d110d588738 /telegabber_test.go | |
parent | 6bd837911431ef68d23de1bcbb75893edd39a32b (diff) |
Fix tests
Diffstat (limited to 'telegabber_test.go')
-rw-r--r-- | telegabber_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/telegabber_test.go b/telegabber_test.go new file mode 100644 index 0000000..459f333 --- /dev/null +++ b/telegabber_test.go @@ -0,0 +1,19 @@ +package main + +import ( + "testing" +) + +func TestTdlibLogInfo(t *testing.T) { + tdlibConstant := stringToTdlibLogConstant(":info") + if tdlibConstant != 3 { + t.Errorf("Wrong TDlib constant for info") + } +} + +func TestTdlibLogInvalid(t *testing.T) { + tdlibConstant := stringToTdlibLogConstant("ziz") + if tdlibConstant != 0 { + t.Errorf("Unknown strings should return fatal loglevel") + } +} |