improved unit test
This commit is contained in:
parent
5c9e297b8b
commit
4b430213d5
@ -8,8 +8,8 @@ import (
|
||||
func TestGet_heading_level(t *testing.T) {
|
||||
level := Get_heading_level("# foo")
|
||||
|
||||
if level < 0 || level > 6 {
|
||||
log.Fatal("Level is not between 0 and 6.")
|
||||
if level != 1 {
|
||||
log.Fatal("Level should be 1.")
|
||||
}
|
||||
|
||||
level = Get_heading_level("not a header")
|
||||
@ -20,7 +20,7 @@ func TestGet_heading_level(t *testing.T) {
|
||||
|
||||
level = Get_heading_level("#")
|
||||
|
||||
if level < 0 || level > 6 {
|
||||
log.Fatal("Level is not between 0 and 6.")
|
||||
if level != 1 {
|
||||
log.Fatal("Level should be 1.")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user