2 files changed,
27 insertions(+),
0 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-04-13 16:53:38 +0300
Change ID:
svoloypxqwswrvlqtmrssztyorsuxqrl
Parent:
22fce74
jump to
| A | algos/bubblesort.go |
| A | algos/bubblesort_test.go |
A
algos/bubblesort_test.go
··· 1 +package algos 2 + 3 +import ( 4 + "reflect" 5 + "testing" 6 +) 7 + 8 +func TestBubleSort(t *testing.T) { 9 + inp := []int{9, 3, 7, 4, 69, 420, 42} 10 + out := []int{3, 4, 7, 9, 42, 69, 420} 11 + 12 + BubbleSort(inp) 13 + if !reflect.DeepEqual((inp), out) { 14 + t.Fatalf("i fucked up, %#v, %#v\n", inp, out) 15 + } 16 +}