You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now that base::inherits() can accept any object in the what argument, and S7 encourages using reified class objects instead of class names as character vectors, it might be useful to add an expect_inherits() function. This function would generally behave like expect_s3_class() but could dispatch nameOfClass() on the second argument when needed.
For example, it could replace tests like those seen here: cole-brokamp/fr#15
I feel like a more tactical change would be to implement expect_s7_class() because it has no implications for existing expect_s3_class() usage. It makes it more clear what the expectation does, and allows argument checking to be more precise.
Now that
base::inherits()
can accept any object in thewhat
argument, and S7 encourages using reified class objects instead of class names as character vectors, it might be useful to add anexpect_inherits()
function. This function would generally behave likeexpect_s3_class()
but could dispatchnameOfClass()
on the second argument when needed.For example, it could replace tests like those seen here: cole-brokamp/fr#15
Possibly related issue: #1448
The text was updated successfully, but these errors were encountered: