forestgeo / AGBfluxes

Compute flux of biomass at ForestGEO sites.
https://forestgeo.github.io/AGBfluxes/
GNU General Public License v3.0
2 stars 1 forks source link

Add tests #10

Closed maurolepore closed 5 years ago

maurolepore commented 5 years ago

From @maurolepore on September 18, 2018 15:12

You are already testing, but likely in a non-systematic way: you write a function, run it, and see its output on the console to check check if it's right. You will save you a lot of time if you test systematically, with an automatic unit testing system such as the testthat package. To use testthat run:

usethis::use_testthat()

Then you will see tests/ in the root directory of your package. Then you add new tests with:

usethis::use_test("name-of-the-file-containing-the-functions-you-want-to-test")

This video shows the testing workflow: https://youtu.be/Ajtfdc2hnxo

_Copied from original issue: ervanSTRI/AGBfluxpack#10

maurolepore commented 5 years ago

Next, we need to start adding tests for each exported function.

maurolepore commented 5 years ago

I'll add tests as they become necessary. For now, it's sufficient with the regression test we already have. If anything changes the output, we'll know.