@@ -16,16 +16,16 @@ function test_description()
16
16
algorithmes = CTBase. add (algorithmes, (:descent , :gradient , :backtracking ))
17
17
algorithmes = CTBase. add (algorithmes, (:descent , :gradient , :fixedstep ))
18
18
19
- @test CTBase. getFullDescription ((:descent ,), algorithmes) == (:descent , :bfgs , :bissection )
20
- @test CTBase. getFullDescription ((:bfgs ,), algorithmes) == (:descent , :bfgs , :bissection )
21
- @test CTBase. getFullDescription ((:bissection ,), algorithmes) == (:descent , :bfgs , :bissection )
22
- @test CTBase. getFullDescription ((:backtracking ,), algorithmes) == (:descent , :bfgs , :backtracking )
23
- @test CTBase. getFullDescription ((:fixedstep ,), algorithmes) == (:descent , :bfgs , :fixedstep )
24
- @test CTBase. getFullDescription ((:fixedstep , :gradient ), algorithmes) == (:descent , :gradient , :fixedstep )
19
+ @test CTBase. complete ((:descent ,); descriptions = algorithmes) == (:descent , :bfgs , :bissection )
20
+ @test CTBase. complete ((:bfgs ,); descriptions = algorithmes) == (:descent , :bfgs , :bissection )
21
+ @test CTBase. complete ((:bissection ,); descriptions = algorithmes) == (:descent , :bfgs , :bissection )
22
+ @test CTBase. complete ((:backtracking ,); descriptions = algorithmes) == (:descent , :bfgs , :backtracking )
23
+ @test CTBase. complete ((:fixedstep ,); descriptions = algorithmes) == (:descent , :bfgs , :fixedstep )
24
+ @test CTBase. complete ((:fixedstep , :gradient ); descriptions = algorithmes) == (:descent , :gradient , :fixedstep )
25
25
26
26
# incorrect description
27
- @test_throws CTBase. AmbiguousDescription CTBase. getFullDescription ((:ttt ,), algorithmes)
28
- @test_throws CTBase. AmbiguousDescription CTBase. getFullDescription ((:descent , :ttt ), algorithmes)
27
+ @test_throws CTBase. AmbiguousDescription CTBase. complete ((:ttt ,); descriptions = algorithmes)
28
+ @test_throws CTBase. AmbiguousDescription CTBase. complete ((:descent , :ttt ); descriptions = algorithmes)
29
29
30
30
# diff
31
31
x = (:a , :b , :c )
@@ -37,16 +37,16 @@ function test_description()
37
37
algorithmes = ()
38
38
algorithmes = CTBase. add (algorithmes, (:a , :b , :c ))
39
39
algorithmes = CTBase. add (algorithmes, (:a , :b , :c , :d ))
40
- @test CTBase. getFullDescription ((:a , :b ), algorithmes) == (:a , :b , :c )
41
- @test CTBase. getFullDescription ((:a , :b , :c , :d ), algorithmes) == (:a , :b , :c , :d )
40
+ @test CTBase. complete ((:a , :b ); descriptions = algorithmes) == (:a , :b , :c )
41
+ @test CTBase. complete ((:a , :b , :c , :d ); descriptions = algorithmes) == (:a , :b , :c , :d )
42
42
43
43
# inclusion and different sizes - switch ordering
44
44
# priority to the first with max shared elements
45
45
algorithmes = ()
46
46
algorithmes = CTBase. add (algorithmes, (:a , :b , :c , :d ))
47
47
algorithmes = CTBase. add (algorithmes, (:a , :b , :c ))
48
- @test CTBase. getFullDescription ((:a , :b ), algorithmes) == (:a , :b , :c , :d )
49
- @test CTBase. getFullDescription ((:a , :b , :c , :d ), algorithmes) == (:a , :b , :c , :d )
48
+ @test CTBase. complete ((:a , :b ); descriptions = algorithmes) == (:a , :b , :c , :d )
49
+ @test CTBase. complete ((:a , :b , :c , :d ); descriptions = algorithmes) == (:a , :b , :c , :d )
50
50
51
51
# CTBase.add a description already in the list
52
52
algorithmes = ()
0 commit comments