Skip to content

Commit

Permalink
Remove temporary mechanism for skipping CBOR tests.
Browse files Browse the repository at this point in the history
The CBOR decode and "appendix a" unit tests cover specific serialization behaviors that were known
to be incomplete at the time. Now that all of those cases have been addressed, the mechanism for
skipping those tests can be removed.
  • Loading branch information
benluddy committed Jun 26, 2024
1 parent 85ede67 commit 2029bba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ func TestAppendixA(t *testing.T) {
reject string // reason the decoder rejects the example
encoded []byte // re-encoded object (only if different from example encoding)
reasons []string // reasons for re-encode difference

// TODO: The cases with nonempty fixme are known to be not working and fixing them
// is an alpha criteria. They're present and skipped for visibility.
fixme string
}{
{
example: hex("00"),
Expand Down Expand Up @@ -558,10 +554,6 @@ func TestAppendixA(t *testing.T) {
},
} {
t.Run(fmt.Sprintf("%x", tc.example), func(t *testing.T) {
if tc.fixme != "" {
t.Skip(tc.fixme) // TODO: Remove once all cases are fixed.
}

var decoded interface{}
err := modes.Decode.Unmarshal(tc.example, &decoded)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ func TestDecode(t *testing.T) {
into interface{} // prototype for concrete destination type. if nil, decode into empty interface value.
want interface{}
assertOnError func(t *testing.T, e error)

// TODO: Some failing test cases are included for completeness. The next library
// minor version should allow them all to be fixed. In the meantime, this field
// explains the behavior reason for a particular failure.
fixme string
}

// Test cases are grouped by the kind of the CBOR data item being decoded, as enumerated in
Expand All @@ -70,13 +65,6 @@ func TestDecode(t *testing.T) {
}

t.Run(fmt.Sprintf("%s/mode=%s", test.name, modeName), func(t *testing.T) {
if test.fixme != "" {
// TODO: Remove this along with the
// fixme field when the last skipped
// test case is passing.
t.Skip(test.fixme)
}

var dst reflect.Value
if test.into == nil {
var i interface{}
Expand Down

0 comments on commit 2029bba

Please sign in to comment.