gophergala/learn-Go-the-hard-way

found some l1 test bug

WIZARD-CXY opened this issue · 2 comments

Just finish the l1 test. I think the reverse test code should be

if slice[0] != myType(2) || slice[1] != myType(1) || slice[2] != myType(0) || len(slice) != 3 {
        t.Fail()
}

otherwise if we don't reverse the slice and just use the old slice which is [0,1,2], it passes the test

maybe just a subtle bug,never mind