Skip to content

Commit

Permalink
updating rdas and vmt test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
erika-redding committed Feb 5, 2024
1 parent c6ed043 commit d5d634f
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 5 deletions.
Binary file modified data/day.rda
Binary file not shown.
Binary file modified data/hh.rda
Binary file not shown.
Binary file modified data/person.rda
Binary file not shown.
Binary file modified data/test_data.rda
Binary file not shown.
Binary file modified data/trip.rda
Binary file not shown.
Binary file modified data/value_labels.rda
Binary file not shown.
Binary file modified data/variable_list.rda
Binary file not shown.
Binary file modified data/vehicle.rda
Binary file not shown.
7 changes: 2 additions & 5 deletions tests/testthat/test_hts_calculate_vmt.R
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@

context("Test suite for hts_calculate_vmt function")

# Load necessary libraries and setup environment
library(testthat)
library(data.table)



test_that("hts_calculate_vmt should return a data table", {

results = hts_calculate_vmt(
Expand All @@ -18,8 +15,8 @@ test_that("hts_calculate_vmt should return a data table", {
vehicle_modes = 6:10
)

expect_type(results, "list", info = "hts_prep_data should return a data table")
expect_type(results, "list")

expect_true(vmt %in% names(results), info = "vmt is in returned table")
expect_true('vmt' %in% names(results), info = "vmt is in returned table")

})

0 comments on commit d5d634f

Please sign in to comment.