Skip to content

Commit

Permalink
Merge pull request #121 from atorus-research/snapshot_updates
Browse files Browse the repository at this point in the history
Update snapshots for current package versions
  • Loading branch information
mstackhouse committed Jan 10, 2023
2 parents f28b635 + 76f434f commit 004a8e0
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 26 deletions.
28 changes: 21 additions & 7 deletions tests/testthat/_snaps/column_headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,47 @@

# Header strings must have the same number of columns as the data frame

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

---

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

---

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

---

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

---

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

---

Number of columns provided in header string does not match data
i In index: 1.
Caused by error:
! Number of columns provided in header string does not match data

# Unmatched spanner brackers

Unmatched brackets for spanning headers

# add_column_headers throws an error when you use a token and don't pass header_n

You must pass a header_n if you are using replacement tokens
i In index: 1.
Caused by error:
! You must pass a header_n if you are using replacement tokens

27 changes: 18 additions & 9 deletions tests/testthat/_snaps/count.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Count layer clauses with invalid syntax give informative error

group_count `where` condition `bad == code` is invalid. Filter error:
i In index: 1.
Caused by error in `value[[3L]]()`:
! group_count `where` condition `bad == code` is invalid. Filter error:
Error in `filter()`:
! Problem while computing `..1 = bad == code`.
Caused by error in `mask$eval_all_filter()`:
! object 'bad' not found


# Total rows and missing counts are displayed correctly(0.1.5 Updates)

Expand Down Expand Up @@ -124,7 +125,9 @@

# Nested count layers can accept text values in the first variable

Inner layers must be data driven variables
i In index: 1.
Caused by error:
! Inner layers must be data driven variables

# Variable names will be coersed into symbols

Expand All @@ -136,23 +139,27 @@

# keep_levels works as expeceted

group_count `where` condition `TRUE` is invalid. Filter error:
i In index: 1.
Caused by error in `value[[3L]]()`:
! group_count `where` condition `TRUE` is invalid. Filter error:
Error: level passed to `kept_levels` not found: 10 20


---

group_count `where` condition `TRUE` is invalid. Filter error:
i In index: 1.
Caused by error in `value[[3L]]()`:
! group_count `where` condition `TRUE` is invalid. Filter error:
Error: level passed to `kept_levels` not found: nothere


# nested count layers handle `set_denoms_by` as expected

You can not pass the second variable in `vars` as a denominator.

# nested count layers will error out if second variable is bigger than the first

The number of values of your second variable must be greater than the number of levels in your first variable
i In index: 1.
Caused by error:
! The number of values of your second variable must be greater than the number of levels in your first variable

# set_numeric_threshold works as expected

Expand Down Expand Up @@ -305,7 +312,9 @@

# nested count layers error out when you try to add a total row

You can't include total rows in nested counts. Instead, add a seperate layer for total counts.
i In index: 1.
Caused by error:
! You can't include total rows in nested counts. Instead, add a seperate layer for total counts.

# Tables with pop_data can accept a layer level where

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/_snaps/desc.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Desc layer clauses with invalid syntax give informative error

group_desc `where` condition `bad == code` is invalid. Filter error:
i In index: 1.
Caused by error in `value[[3L]]()`:
! group_desc `where` condition `bad == code` is invalid. Filter error:
Error in `filter()`:
! Problem while computing `..1 = bad == code`.
Caused by error in `mask$eval_all_filter()`:
! object 'bad' not found


# Stats as columns properly transposes the built data

Expand Down
12 changes: 9 additions & 3 deletions tests/testthat/_snaps/layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,19 @@

# Desc layers only accept numeric variables

Target variable `supp` is not numeric. Target variables must be numeric for desc layers.
i In index: 1.
Caused by error:
! Target variable `supp` is not numeric. Target variables must be numeric for desc layers.

---

Target variable `supp` is not numeric. Target variables must be numeric for desc layers.
i In index: 2.
Caused by error:
! Target variable `supp` is not numeric. Target variables must be numeric for desc layers.

---

Target variable `supp` is not numeric. Target variables must be numeric for desc layers.
i In index: 1.
Caused by error:
! Target variable `supp` is not numeric. Target variables must be numeric for desc layers.

12 changes: 9 additions & 3 deletions tests/testthat/_snaps/precision.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Missing by variables are handled as specified in precision data

The precision data provided is missing by variable cases:
i In index: 1.
Caused by error:
! The precision data provided is missing by variable cases:
vs
Datsun 710 1

---

The precision data provided is missing by variable cases:
i In index: 1.
Caused by error:
! The precision data provided is missing by variable cases:
vs
Datsun 710 1

Expand Down Expand Up @@ -52,7 +56,9 @@

---

By variable types mismatch between precision dataset and target data
i In index: 1.
Caused by error:
! By variable types mismatch between precision dataset and target data

# Partially provided decimal precision caps populate correctly

Expand Down
5 changes: 3 additions & 2 deletions tests/testthat/_snaps/shift.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Shift layer clauses with invalid syntax give informative error

group_shift `where` condition `bad == code` is invalid. Filter error:
i In index: 1.
Caused by error in `value[[3L]]()`:
! group_shift `where` condition `bad == code` is invalid. Filter error:
Error in `filter()`:
! Problem while computing `..1 = bad == code`.
Caused by error in `mask$eval_all_filter()`:
! object 'bad' not found


0 comments on commit 004a8e0

Please sign in to comment.