mumuki-qsim-runner 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/checker.rb +15 -4
- data/lib/html_renderer.rb +1 -1
- data/lib/locales/en.yml +1 -0
- data/lib/locales/es.yml +1 -0
- data/lib/test_hook.rb +1 -1
- data/lib/version.rb +1 -1
- data/lib/view/records.html.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be822481a8dcdd5175e7359e5539597f0d97536bba0b67968d49a2e7249a08c
|
4
|
+
data.tar.gz: 3f9dab23f429cf07f1eb744d5a6cc46032547ff25ffaf0fc0a85579622e011c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37018b380d5d5405d8c262be206c792ae8f0b1f46a93e5d95af82bf2f87bb7d9e481fd9155eaf5fc3bd15536942f1db2dd5150077e04d95e9a7796ab6f6e4c90
|
7
|
+
data.tar.gz: a5c37a7c73968714c9770bebf5cbed872ee8b1b32c19c51a23d8f23e710ed073c61a0e30c82496a9c8c643d3ecb4621eddae324d5b1057a17f8773bdb7662587
|
data/lib/checker.rb
CHANGED
@@ -5,10 +5,10 @@ module Qsim
|
|
5
5
|
super
|
6
6
|
end
|
7
7
|
|
8
|
-
def check_equal(result,
|
9
|
-
|
10
|
-
actual = result
|
11
|
-
fail I18n.t(:check_equal_failure, record:
|
8
|
+
def check_equal(result, state)
|
9
|
+
state.each do |target, expected|
|
10
|
+
actual = target_value result, target
|
11
|
+
fail I18n.t(:check_equal_failure, record: target, expected: expected, actual: actual) unless actual == expected
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -22,6 +22,17 @@ module Qsim
|
|
22
22
|
|
23
23
|
private
|
24
24
|
|
25
|
+
def target_value(result, target)
|
26
|
+
case target
|
27
|
+
when /R\d/
|
28
|
+
result[:records][target]
|
29
|
+
when /[0-9A-F]{4}/
|
30
|
+
result[:memory][target]
|
31
|
+
else
|
32
|
+
error I18n.t :unknown_target, target: target
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
25
36
|
def renderer
|
26
37
|
@renderer ||= Qsim::HtmlRenderer.new
|
27
38
|
end
|
data/lib/html_renderer.rb
CHANGED
data/lib/locales/en.yml
CHANGED
data/lib/locales/es.yml
CHANGED
data/lib/test_hook.rb
CHANGED
@@ -45,7 +45,7 @@ class QsimTestHook < Mumukit::Templates::FileHook
|
|
45
45
|
def to_examples(examples)
|
46
46
|
examples.each_with_index.map do |example, index|
|
47
47
|
example[:preconditions] = classify(example.fetch(:preconditions, {}))
|
48
|
-
|
48
|
+
{ id: index, output: @output }.deep_merge example
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
data/lib/version.rb
CHANGED
data/lib/view/records.html.erb
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
<h5><%= I18n.t :memory %></h5>
|
21
21
|
<table class="table table-bordered qsim-fields">
|
22
22
|
<tbody>
|
23
|
-
<% @result[:memory].each_slice(
|
23
|
+
<% @result[:memory].each_slice(16) do |group| %>
|
24
24
|
<tr>
|
25
25
|
<% group.each.with_index do |record, index| %>
|
26
26
|
<% if index.zero? %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumuki-qsim-runner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Federico Aloi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mumukit
|