@@ -8,17 +8,17 @@ _parameters(sig::DataType) = sig.parameters
8
8
_parameters (sig:: Union ) = Base. uniontypes (sig)
9
9
10
10
"""
11
- test_method_tables_sensibility ()
11
+ test_method_tables ()
12
12
13
13
Checks that the method tables for `rrule` and `frule` are sensible.
14
14
This in future may carry out a number of checks, but presently just checks to make sure that
15
- no rules have been added to the very general `DataType`, `Union` or `UnionAll` types.
16
- This is easy to do when writing rules for constructors.
17
- It happens if you writeg. `rrule(::typeof(Foo), x)` rather than `rrule(::Type{<:Foo}, x)`:
15
+ no rules have been added to the very general `DataType`, `Union` or `UnionAll` types,
16
+ which is easy to do accidentally when writing rules for constructors.
17
+ It happens if you write e.g. `rrule(::typeof(Foo), x)` rather than `rrule(::Type{<:Foo}, x)`.
18
18
This would then actually define `rrule(::DataType, x)`. (or `UnionAll` if `Foo`
19
19
was parametric, or `Union` if `Foo` was a type alias for a `Union`)
20
20
"""
21
- function test_method_tables_sensibility ()
21
+ function test_method_tables ()
22
22
@testset " Sensible Constructors" begin
23
23
# if someone wrote e.g. `rrule(::typeof(Foo), x)` rather than
24
24
# `rrule(::Type{<:Foo}, x)` then that would actually define `rrule(::DataType, x)`
@@ -33,7 +33,7 @@ function test_method_tables_sensibility()
33
33
end
34
34
35
35
@test_msg (
36
- " Bad constructor rrule. typeof(T) used rather than `Type{T}`. $method " ,
36
+ " Bad constructor rrule. ` typeof(T)` used rather than `Type{T}`. $method " ,
37
37
function_type ∉ (DataType, UnionAll, Union)
38
38
)
39
39
end
@@ -48,7 +48,7 @@ function test_method_tables_sensibility()
48
48
end
49
49
50
50
@test_msg (
51
- " Bad constructor frule. typeof(T) used rather than `Type{T}`. $method " ,
51
+ " Bad constructor frule. ` typeof(T)` used rather than `Type{T}`. $method " ,
52
52
function_type ∉ (DataType, UnionAll, Union)
53
53
)
54
54
end
0 commit comments