Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

features/75-WITec-unittest #82

Merged
merged 9 commits into from
Aug 16, 2021
Merged

Conversation

sangttruong
Copy link

Resolve #75

@sangttruong sangttruong requested a review from GegznaV August 12, 2021 15:55
@GegznaV
Copy link
Member

GegznaV commented Aug 12, 2021

@sangttruong, were the old unit tests removed and only new ones based on #55 added? Or both old and new unit tests are kept in this PR?

Copy link
Member

@GegznaV GegznaV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must keep both old and new unit tests. Just for the old ones, we must use correct paths to files by using system.file() function.

THese files, that were in tar archive, must also be present in inst/extdata directory.

@GegznaV
Copy link
Member

GegznaV commented Aug 13, 2021

@sangttruong wrote:

Here is the block that I use to read the file

  header <- system.file(
    "extdata",
    "txt.Witec/nofilename_Header.txt",
    package = "hySpc.read.txt"
  )
  
  filex <- system.file(
    "extdata",
    "txt.Witec/nofilename_X-Axis.txt",
    package = "hySpc.read.txt"
  )

  filey <- system.file(
    "extdata",
    "txt.Witec/nofilename_Y-Axis.txt",
    package = "hySpc.read.txt"
  )
  expect_silent(spc <- read_txt_WITec_Graph(header, filex, filey))

It keeps throwing this cryptic error: Error in lapply(tmp, as.numeric) :
invalid multibyte string at '<8d><96><88>m'

It's the last commit on reading .txt if you would like to take a look. The old unit test (which I commented out at the bottom doesn't return an error)

I do not have time to look into this now. @cbeleites, can you help?

@sangttruong sangttruong marked this pull request as ready for review August 16, 2021 14:13
Copy link
Collaborator

@bryanhanson bryanhanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything works, all comments addressed.

@bryanhanson bryanhanson merged commit b00d0db into develop Aug 16, 2021
@bryanhanson bryanhanson deleted the features/75-WITec-unit-test branch August 16, 2021 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve WITec unit tests
3 participants