assert package updated
Этот коммит содержится в:
родитель
6bc90d4218
коммит
036e739bf1
4 изменённых файлов: 8 добавлений и 8 удалений
4
go.mod
4
go.mod
|
@ -1,3 +1,5 @@
|
||||||
module github.com/andygeiss/esp32-transpiler
|
module github.com/andygeiss/esp32-transpiler
|
||||||
|
|
||||||
require github.com/andygeiss/assert v0.0.3
|
go 1.12
|
||||||
|
|
||||||
|
require github.com/andygeiss/assert v0.0.6
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -1,2 +1,2 @@
|
||||||
github.com/andygeiss/assert v0.0.3 h1:PgY7eH+UaCvOzScsX3HGqNfCemkvpcNHQjwT2Dyq0sw=
|
github.com/andygeiss/assert v0.0.6 h1:FyiAIudVwnxp55GIcNOaZ2ABr8n2RI9SXmaXG7+Y53o=
|
||||||
github.com/andygeiss/assert v0.0.3/go.mod h1:ztUvWrfUo43X0zMA1XfX8esn5Uavk6ANSKTT0w2qvAI=
|
github.com/andygeiss/assert v0.0.6/go.mod h1:ztUvWrfUo43X0zMA1XfX8esn5Uavk6ANSKTT0w2qvAI=
|
||||||
|
|
|
@ -3,7 +3,6 @@ package transpile_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/andygeiss/assert"
|
"github.com/andygeiss/assert"
|
||||||
"github.com/andygeiss/assert/is"
|
|
||||||
"github.com/andygeiss/esp32-transpiler/api/worker"
|
"github.com/andygeiss/esp32-transpiler/api/worker"
|
||||||
"github.com/andygeiss/esp32-transpiler/impl/transpile"
|
"github.com/andygeiss/esp32-transpiler/impl/transpile"
|
||||||
"io"
|
"io"
|
||||||
|
@ -32,5 +31,5 @@ func TestTranspileErrorShouldBeNil(t *testing.T) {
|
||||||
worker := &mockupWorker{&in, &out}
|
worker := &mockupWorker{&in, &out}
|
||||||
trans := transpile.NewTranspiler(worker)
|
trans := transpile.NewTranspiler(worker)
|
||||||
err := trans.Transpile()
|
err := trans.Transpile()
|
||||||
assert.That(t, err, is.Equal(nil))
|
assert.That(t, err, nil)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package worker_test
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"github.com/andygeiss/assert"
|
"github.com/andygeiss/assert"
|
||||||
"github.com/andygeiss/assert/is"
|
|
||||||
"github.com/andygeiss/esp32-transpiler/impl/worker"
|
"github.com/andygeiss/esp32-transpiler/impl/worker"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
@ -24,10 +23,10 @@ func Validate(source, expected string, t *testing.T) {
|
||||||
var in, out bytes.Buffer
|
var in, out bytes.Buffer
|
||||||
in.WriteString(source)
|
in.WriteString(source)
|
||||||
wrk := worker.NewWorker(&in, &out, worker.NewMapping())
|
wrk := worker.NewWorker(&in, &out, worker.NewMapping())
|
||||||
assert.That(t, wrk.Start(), is.Equal(nil))
|
assert.That(t, wrk.Start(), nil)
|
||||||
code := out.String()
|
code := out.String()
|
||||||
tcode, texpected := Trim(code), Trim(expected)
|
tcode, texpected := Trim(code), Trim(expected)
|
||||||
assert.That(t, tcode, is.Equal(texpected))
|
assert.That(t, tcode, texpected)
|
||||||
}
|
}
|
||||||
|
|
||||||
func Test_Empty_Package(t *testing.T) {
|
func Test_Empty_Package(t *testing.T) {
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче