Skip to content

Commit

Permalink
removed old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ugol committed Jun 25, 2023
1 parent f186794 commit d8330bb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 97 deletions.
57 changes: 0 additions & 57 deletions pkg/functions_test/functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,63 +63,6 @@ func TestMin(t *testing.T) {
}
}

func TestUSState(t *testing.T) {

hawaii := "{{seed 0}}{{capital_at 22}} {{state_at 10}} {{state_short_at 10}} {{zip_at 10}}"
massachussets := `{{capital_at 8}} {{state_at 20}} {{state_short_at 20}} {{zip_at 20}}`
newyork := `{{capital_at 0}} {{state_at 31}} {{state_short_at 31}} {{zip_at 31}}`
texas := `{{capital_at 4}} {{state_at 42}} {{state_short_at 42}} {{zip_at 42}}`
virginia := `{{capital_at 40}} {{state_at 45}} {{state_short_at 45}} {{zip_at 45}}`
wyoming := `{{capital_at 11}} {{state_at 49}} {{state_short_at 49}} {{zip_at 49}}`
if err := runt(hawaii, "Honolulu Hawaii HI 96813"); err != nil {
t.Error(err)
}
if err := runt(massachussets, "Boston Massachusetts MA 02201"); err != nil {
t.Error(err)
}
if err := runt(newyork, "Albany New York NY 12207"); err != nil {
t.Error(err)
}
if err := runt(texas, "Austin Texas TX 78701"); err != nil {
t.Error(err)
}
if err := runt(virginia, "Richmond Virginia VA 23219"); err != nil {
t.Error(err)
}
if err := runt(wyoming, "Cheyenne Wyoming WY 82001"); err != nil {
t.Error(err)
}
}

func TestCache(t *testing.T) {

v, f := functions.Cache("wine")

if v != true || f != nil {
t.Error("cache should be empty, no errors")
}
v, f = functions.Cache("wine")
if v != false || f != nil {
t.Error("cache should be full, no errors")
}
_, f = functions.Cache("wines")
if f == nil {
t.Error("no cacheable, should get error")
}
}

func TestFrom(t *testing.T) {

tpl := `{{seed 0}}{{from "actor"}}`
if err := runt(tpl, "Sean Connery"); err != nil {
t.Error(err)
}
tpl = `{{from "actors"}}`
if err := runt(tpl, ""); err != nil {
t.Error(err)
}
}

func TestPassword(t *testing.T) {

tpl := `{{seed 0}}{{password 5 true "PwD" "!?!"}}`
Expand Down
40 changes: 0 additions & 40 deletions pkg/functions_test/tpl_test.go

This file was deleted.

0 comments on commit d8330bb

Please sign in to comment.