github.com/alimy/mir/v4@v4.1.0/engine/engine_test.go (about) 1 // Copyright 2020 Michael Li <alimy@gility.net>. All rights reserved. 2 // Use of this source code is governed by Apache License 2.0 that 3 // can be found in the LICENSE file. 4 5 package engine 6 7 import ( 8 "testing" 9 ) 10 11 func TestGenerate(t *testing.T) { 12 if err := Generate(nil, nil); err == nil { 13 t.Error("want an error but not") 14 } 15 AddEntry(nil) 16 AddEntry(nil, nil) 17 if len(mirEntries) != 4 { 18 t.Errorf("want mirEntries's size is 4 but is %d", len(mirEntries)) 19 } 20 }