rgot 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/sig/rgot.rbs ADDED
@@ -0,0 +1,232 @@
1
+ module Rgot
2
+ VERSION: "1.2.0"
3
+
4
+ def self.now: () -> Float
5
+ def self.benchmark: (?Hash[Symbol, String] opts_hash) { (B) -> void } -> BenchmarkResult
6
+ def self.verbose?: () -> bool
7
+
8
+ class Cli
9
+ @argv: Array[String]
10
+
11
+ def initialize: (untyped argv) -> void
12
+ def run: () -> void
13
+
14
+ private
15
+
16
+ def parse_option: (Rgot::M::Options opts) -> void
17
+ def main_process: (Rgot::M::Options opts) -> void
18
+ def testing_files: () -> Array[String]
19
+ def child_process: (Rgot::M::Options opts, String testing_file) -> Integer
20
+ # `node` is RubyVM::AbstractSyntaxTree::Node
21
+ def find_toplevel_name: (untyped node) -> Symbol
22
+ end
23
+
24
+ class Common
25
+ @failed: bool
26
+ @skipped: bool
27
+ @finished: bool
28
+ @start: Float
29
+ @mutex: Thread::Mutex
30
+
31
+ attr_accessor output: String
32
+
33
+ def initialize: () -> void
34
+
35
+ def failed?: () -> bool
36
+ def skipped?: () -> bool
37
+ def finished?: () -> bool
38
+ def fail!: () -> void
39
+ def skip!: () -> void
40
+ def finish!: () -> void
41
+ def log: (*untyped) -> nil
42
+ def logf: (*untyped) -> nil
43
+ def error: (*untyped) -> nil
44
+ def errorf: (*untyped) -> nil
45
+ def fatal: (*untyped) -> bot
46
+ def fatalf: (*untyped) -> bot
47
+ def skip: (*untyped) -> bot
48
+ def skipf: (*untyped) -> bot
49
+ def skip_now: () -> bot
50
+ def fail_now: () -> bot
51
+
52
+ private
53
+
54
+ def decorate: (String) -> String
55
+ def internal_log: (String msg) -> void
56
+ end
57
+
58
+ class M
59
+ class Options
60
+ attr_accessor bench: String?
61
+ attr_accessor benchtime: String?
62
+ attr_accessor timeout: String?
63
+ attr_accessor cpu: String?
64
+ attr_accessor thread: String?
65
+ attr_accessor fuzz: String?
66
+ attr_accessor fuzztime: String?
67
+ end
68
+
69
+ @tests: Array[InternalTest]
70
+ @benchmarks: Array[InternalBenchmark]
71
+ @examples: Array[InternalExample]
72
+ @fuzz_targets: Array[InternalFuzzTarget]
73
+ @fs: Array[F]
74
+ @test_module: Module?
75
+ @opts: M::Options
76
+ @cpu_list: Array[Integer]
77
+ @thread_list: Array[Integer]
78
+
79
+ def initialize: (
80
+ tests: Array[InternalTest],
81
+ benchmarks: Array[InternalBenchmark],
82
+ examples: Array[InternalExample],
83
+ fuzz_targets: Array[InternalFuzzTarget],
84
+ ?test_module: Module?,
85
+ ?opts: Options
86
+ ) -> void
87
+ def run: () -> Integer
88
+
89
+ private
90
+
91
+ def run_tests: () -> bool
92
+ def run_benchmarks: () -> bool
93
+ def run_fuzz_tests: () -> bool
94
+ def run_fuzzing: () -> bool
95
+ def run_examples: () -> bool
96
+ end
97
+
98
+ class T < Common
99
+ @module: Module
100
+ @name: Symbol
101
+
102
+ def initialize: (Module test_module, Symbol name) -> void
103
+ def run: () -> void
104
+ def report: () -> void
105
+ def call: () -> void
106
+ end
107
+
108
+ class B < Common
109
+ class Options
110
+ attr_accessor procs: Integer
111
+ attr_accessor threads: Integer
112
+ attr_accessor benchtime: String?
113
+ end
114
+
115
+ @module: Module?
116
+ @name: Symbol?
117
+ @opts: B::Options
118
+ @timer_on: bool
119
+ @duration: Float
120
+
121
+ attr_accessor n: Integer
122
+
123
+ def initialize: (Module? benchmark_module, Symbol? name, ?B::Options opts) -> void
124
+ def start_timer: () -> void
125
+ def stop_timer: () -> void
126
+ def reset_timer: () -> void
127
+ def run: () ?{ (B) -> void } -> BenchmarkResult
128
+ def run_parallel: () { (PB) -> void } -> void
129
+
130
+ private
131
+
132
+ def run_n: (Integer n, ?Proc? block) -> void
133
+ end
134
+
135
+ class F < Common
136
+ class Options
137
+ attr_accessor fuzz: String?
138
+ attr_accessor fuzztime: String?
139
+ def initialize: (fuzz: String?, fuzztime: String?) -> void
140
+ end
141
+ class CorpusEntry
142
+ attr_accessor values: Array[untyped]
143
+ attr_accessor is_seed: bool
144
+ attr_accessor path: String
145
+ def initialize: (values: Array[untyped], is_seed: bool, path: String) -> void
146
+ def mutate_values: () -> Array[untyped]
147
+ end
148
+ class Coordinator
149
+ attr_accessor count: Integer
150
+ attr_accessor interesting_count: Integer
151
+ def initialize: (warmup_input_count: Integer) -> void
152
+ @warmup_input_count: Integer
153
+ @before_cov: Integer
154
+ @start_time: Float
155
+ @count: Integer
156
+ @interesting_count: Integer
157
+ @count_last_log: Integer
158
+ @time_last_log: Float
159
+ def start_logger: () -> void
160
+ def diff_coverage: () -> Integer
161
+ def log_stats: () -> void
162
+ private
163
+ def elapsed: () -> Integer
164
+ end
165
+ SUPPORTED_TYPES: Hash[untyped, ^(untyped) -> untyped]
166
+ @fuzz_target: InternalFuzzTarget
167
+ @fuzz_block: Proc?
168
+ @opts: F::Options
169
+ @corpus: Array[CorpusEntry]
170
+ @module: Module
171
+ attr_reader name: Symbol
172
+ def initialize: (fuzz_target: InternalFuzzTarget, opts: F::Options) -> void
173
+ def run: () -> void
174
+ def run_testing: () -> void
175
+ def run_fuzzing: () -> void
176
+ def add: (*untyped) -> void
177
+ def fuzz: () { (*untyped) -> void } -> void
178
+ def fuzz?: () -> bool
179
+ def report: () -> void
180
+
181
+ private
182
+
183
+ def call: () -> void
184
+ end
185
+
186
+ class PB
187
+ @bn: Integer
188
+ def initialize: (bn: Integer) -> void
189
+ def next: () -> bool
190
+ end
191
+
192
+ class BenchmarkResult
193
+ attr_reader n: Integer # int // The number of iterations.
194
+ attr_reader t: Float # time.Duration // The total time taken.
195
+ def initialize: (n: Integer, t: Float) -> void
196
+ end
197
+
198
+ class ExampleParser < Ripper
199
+ @in_def: bool
200
+ @has_output: bool
201
+ @output: String
202
+ attr_accessor examples: Array[ExampleOutput]
203
+ end
204
+
205
+ class OptionError < StandardError
206
+ end
207
+
208
+ class InternalTest
209
+ attr_accessor module: Module
210
+ attr_accessor name: Symbol
211
+ end
212
+
213
+ class InternalBenchmark
214
+ attr_accessor module: Module
215
+ attr_accessor name: Symbol
216
+ end
217
+
218
+ class InternalExample
219
+ attr_accessor module: Module
220
+ attr_accessor name: Symbol
221
+ end
222
+
223
+ class InternalFuzzTarget
224
+ attr_accessor module: Module
225
+ attr_accessor name: Symbol
226
+ end
227
+
228
+ class ExampleOutput
229
+ attr_accessor output: String
230
+ attr_accessor name: Symbol
231
+ end
232
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-25 00:00:00.000000000 Z
11
+ date: 2023-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -49,9 +49,11 @@ files:
49
49
  - ".github/workflows/main.yml"
50
50
  - ".gitignore"
51
51
  - Gemfile
52
+ - Gemfile.lock
52
53
  - LICENSE.txt
53
54
  - README.md
54
55
  - Rakefile
56
+ - Steepfile
55
57
  - bin/rgot
56
58
  - lib/rgot.rb
57
59
  - lib/rgot/b.rb
@@ -59,11 +61,16 @@ files:
59
61
  - lib/rgot/cli.rb
60
62
  - lib/rgot/common.rb
61
63
  - lib/rgot/example_parser.rb
64
+ - lib/rgot/f.rb
62
65
  - lib/rgot/m.rb
63
66
  - lib/rgot/pb.rb
64
67
  - lib/rgot/t.rb
65
68
  - lib/rgot/version.rb
69
+ - rbs_collection.lock.yaml
70
+ - rbs_collection.yaml
66
71
  - rgot.gemspec
72
+ - sig/patch.rbs
73
+ - sig/rgot.rbs
67
74
  homepage: https://github.com/ksss/rgot
68
75
  licenses:
69
76
  - MIT
@@ -83,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
90
  - !ruby/object:Gem::Version
84
91
  version: '0'
85
92
  requirements: []
86
- rubygems_version: 3.4.0.dev
93
+ rubygems_version: 3.4.1
87
94
  signing_key:
88
95
  specification_version: 4
89
96
  summary: Ruby + Golang Testing = Rgot