Skip to content

Improve readability of test cases in core package #48

Open
@gunnsth

Description

@gunnsth

The goal is to make the tests more clear and easier to read as well as improve coverage.
Steps:

  • Go through the tests and for each function define the inputs and expected outputs.
  • Use testify to improve readability
  • Process each testcase (t.Run) and compare to expected value with assert.Equal / assert.NoError etc
  • Go through and add tests if any obvious test cases that can be added.

Currently the unit test coverage is [v3]:
$ go test -cover .
ok github.com/unidoc/unidoc/pdf/core 0.214s coverage: 48.7% of statements

whereas with cross-package tests the coverage is ~63.85% according to codecov.io.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions