brodieG / unitizer

Easy R Unit Tests
Other
39 stars 7 forks source link

Don't compare warning/error calls when one is missing #285

Closed brodieG closed 2 years ago

brodieG commented 2 years ago

This is to handle issues with instability when a call is issued from C level error and warning, where sometimes the warning message displays the call, and sometimes not (maybe related to byte compilation).

brodieG commented 2 years ago

A bit tricky, also saw this depending on whether bytecompilation enabled (2nd) or not (1st):

  Condition list with 1 condition:                                              
< 1. Error in `substr2_ctl<-`(`*tmp*`, start = start, stop = stop, warn = warn, 
<    : Argument `carry` must be TRUE or FALSE.                                  
> 1. Error in `substr2_ctl<-`(x = `*tmp*`, start = start, stop = stop, warn =   
>    warn,  : Argument `carry` must be TRUE or FALSE.              

In R Under development (unstable) (2021-11-21 r81221) -- "Unsuffered Consequences".

Additional note, we run into this with covr, presumably because it runs with byte compilation off.