generated from stscoundrel/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain_test.go
92 lines (63 loc) · 1.64 KB
/
main_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
package main
import (
"errors"
"fmt"
"os"
"testing"
)
func TestCreatesJsonBuild(t *testing.T) {
ToJson()
_, err := os.Stat("./build/dictionary.json")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("JSON output file not found in build directory")
}
}
func TestCreatesDslBuild(t *testing.T) {
ToDsl()
_, err := os.Stat("./build/dictionary.dsl")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("DSL output file not found in build directory")
}
}
func TestCreatesXmlBuild(t *testing.T) {
ToXml()
_, err := os.Stat("./build/dictionary.xml")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("XML output file not found in build directory")
}
}
func TestCreatesGoPackageBuild(t *testing.T) {
ToGoPackage()
_, err := os.Stat("./build/dictionary.go")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("Go package output file not found in build directory")
}
}
func TestCreatesRustModuleBuild(t *testing.T) {
ToRustModule()
_, err := os.Stat("./build/dictionary.rs")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("Rust module output file not found in build directory")
}
}
func TestCreatesTypeScriptModuleBuild(t *testing.T) {
ToTypeScriptModule()
_, err := os.Stat("./build/dictionary.ts")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("TypeScript module output file not found in build directory")
}
}
func TestCreatesPythonClassBuild(t *testing.T) {
ToPythonClass()
_, err := os.Stat("./build/dictionary.py")
fmt.Println(err)
if errors.Is(err, os.ErrNotExist) {
t.Error("Python class output file not found in build directory")
}
}