Skip to content

Commit

Permalink
Merge pull request #2 from Anastasiiiii/failed-tests
Browse files Browse the repository at this point in the history
Commit to fail tests
  • Loading branch information
julikss committed Jun 23, 2022
2 parents 5d20506 + d6dcc2e commit ad456d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
7 changes: 0 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,3 @@ go 1.17

// TODO: Change if need to use a different assertions library.
require github.com/stretchr/testify v1.7.0

require (
github.com/davecgh/go-spew v1.1.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.1.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)
9 changes: 4 additions & 5 deletions handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

func TestPrefixToPostfix(test *testing.T) {
expression := "+ 2 * 3 6"
expected := "2 3 6 * +"
expected := "2 3 6 + *"
input := strings.NewReader(expression)
output := bytes.NewBufferString("")

handler := &ComputeHandler{
Input: input,
Input: input,
Output: output,
}

Expand All @@ -31,18 +31,17 @@ func TestEmptyExpression(test *testing.T) {
output := bytes.NewBufferString("")

handler := &ComputeHandler{
Input: input,
Input: input,
Output: output,
}


err := handler.Compute()
assert.NotNil(test, err)
}

func TestWrongExpression(test *testing.T) {
expression := ""
input := strings.NewReader(expression)
input := strings.NewReader(expression)
output := bytes.NewBufferString("")

handler := &ComputeHandler{
Expand Down

0 comments on commit ad456d9

Please sign in to comment.