|
1 | 1 | using Core.IR |
2 | 2 | using Test |
3 | | -using Cthulhu: descend, get_inference_world, find_method_instance, generate_code_instance, lookup, get_ci, get_override, find_callsites, Command, menu_commands, is_command_enabled, show_command, CthulhuState, get_pc_effects, get_pc_remarks, get_pc_excts, get_inlining_costs, show_parameters |
4 | | -using .CompilerIntegration: DefaultProvider, PC2Effects, PC2Remarks, PC2Excts, LookupResult |
5 | | -using Cthulhu.Testing: VirtualTerminal, TestHarness, @run, wait_for, read_next, end_terminal_session |
6 | | -using Logging: with_logger, NullLogger |
| 3 | +using Cthulhu: Command, CthulhuConfig, CthulhuState, descend, find_callsites, |
| 4 | + find_method_instance, generate_code_instance, get_ci, get_inference_world, |
| 5 | + get_inlining_costs, get_override, get_pc_effects, get_pc_excts, get_pc_remarks, |
| 6 | + is_command_enabled, lookup, menu_commands, show_command, show_parameters |
| 7 | +using .CompilerIntegration: DefaultProvider, LookupResult, PC2Effects, PC2Excts, PC2Remarks |
| 8 | +using Cthulhu.Testing: @run, TestHarness, VirtualTerminal, end_terminal_session, read_next, |
| 9 | + wait_for |
| 10 | +using Logging: NullLogger, with_logger |
7 | 11 |
|
8 | 12 | function test_provider_api(provider, args...) |
9 | 13 | world = get_inference_world(provider) |
@@ -59,9 +63,14 @@ function test_provider_api(provider, args...) |
59 | 63 | end |
60 | 64 | end |
61 | 65 |
|
| 66 | +function default_config_kwargs() |
| 67 | + config = CthulhuConfig() |
| 68 | + return NamedTuple(name => getfield(config, name) for name in propertynames(config)) |
| 69 | +end |
| 70 | + |
62 | 71 | function test_descend_for_provider(provider, args...; show = false) |
63 | 72 | terminal = VirtualTerminal() |
64 | | - harness = @run terminal descend(args...; terminal, provider) |
| 73 | + harness = @run terminal descend(args...; terminal, provider, default_config_kwargs()...) |
65 | 74 | write(terminal, 'T') |
66 | 75 | write(terminal, 'o') # optimize: on |
67 | 76 | write(terminal, 'L') |
|
0 commit comments