aboutsummaryrefslogtreecommitdiff
path: root/challenge-119/lance-wicks/golang/nibble_test.go
blob: 9fdc859571499d3ae6611201281a658cc3cb67cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import (
	"testing"

	"github.com/stretchr/testify/assert"
)

func TestSwap(t *testing.T) {

	t.Run("Example 1", func(t *testing.T) {
		got := NSwap(101)
		want := 86

		assert.Equal(t, got, want)
	})

	t.Run("Example 2", func(t *testing.T) {
		got := NSwap(18)
		want := 33

		assert.Equal(t, got, want)
	})
}