Skip to content

Commit

Permalink
Running fuzz tests in CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
wk8 committed Dec 11, 2022
1 parent c95df00 commit 75d4dc4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := all

.PHONY: all
all: test lint
all: test lint fuzz

# the TEST_FLAGS env var can be set to eg run only specific tests
.PHONY: test
Expand All @@ -12,6 +12,10 @@ test:
bench:
go test -bench=.

.PHONY: fuzz
fuzz:
go test -fuzz=. -fuzztime=10s ./...

.PHONY: lint
lint:
golangci-lint run
4 changes: 4 additions & 0 deletions json.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ var (

// MarshalJSON implements the json.Marshaler interface.
func (om *OrderedMap[K, V]) MarshalJSON() ([]byte, error) { //nolint:funlen
if om == nil || om.list == nil {
return []byte("null"), nil
}

writer := jwriter.Writer{}
writer.RawByte('{')

Expand Down

0 comments on commit 75d4dc4

Please sign in to comment.