Demo entry 6353096

testify

   

Submitted by anonymous on Mar 29, 2017 at 06:58
Language: Go. Code size: 274 Bytes.

package testing

import (
	"testing"
	"github.com/stretchr/testify/assert"
)

func TestMyLists(t *testing.T) {
	listA := []int{1, 2, 3, 4}
	listB := []int{4, 2, 3, 1}
	assert.Equal(t, listA, listB)        // fail
	assert.ObjectsAreEqual(listA, listB) // pass
}

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).