test_ids 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cea5719b40b86ef2d2f2ace4c95783c1d8da7fb4
4
- data.tar.gz: cddf15343f7aa04612106e9d4c09263512993192
3
+ metadata.gz: bb082e87d6a2fe94daeb06ca7afe3666bab6b9b0
4
+ data.tar.gz: c6ea82a1417478b63413bf51e7cd58bfca6fe828
5
5
  SHA512:
6
- metadata.gz: fb15b357a68c018d2bf5d17f03b69f0649b6e6ee928576b2da2326e2176690aa0da1572b839672087ec2521ad12130276650b5275cc1ade31ea0bfa89f7dd38e
7
- data.tar.gz: 8ca7d69f8c92835e5853ee163b1a2b8d6dca0f00e27c3fe88db06bcead8ec580cea2ccbb974e36c46aa0e0ef2cd5506ee241b07cd3d577fe0b105e680955c176
6
+ metadata.gz: a24cabcbdf2d02a3ac2f9f0a3575ea0c211939f560ac0f2df4cc14ef9d43c043793fd4a3aaeb248e5f5102fdaf9a54b34a451084820088e5d0722ba67ef868c9
7
+ data.tar.gz: 08095b4eaeba91a616ff7cbbccfe1f610ab5e3ea6e9ed6fcdbdb8217e82f32c4eaa72a96a545cc1b166fcfcf155c7dc16d9687e93065c7624b76903022d344ff
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module TestIds
2
2
  MAJOR = 0
3
- MINOR = 4
4
- BUGFIX = 1
3
+ MINOR = 5
4
+ BUGFIX = 0
5
5
  DEV = nil
6
6
 
7
7
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
@@ -51,6 +51,9 @@ module TestIds
51
51
  t['bin'] ||= allocate_bin
52
52
  t['softbin'] ||= allocate_softbin(t['bin'])
53
53
  t['number'] ||= allocate_number(t['bin'], t['softbin'])
54
+ t['bin'] = nil if t['bin'] == :none
55
+ t['softbin'] = nil if t['softbin'] == :none
56
+ t['number'] = nil if t['number'] == :none
54
57
  # Record that there has been a reference to the final numbers
55
58
  time = Time.now.to_f
56
59
  store['references']['bin'][t['bin'].to_s] = time if t['bin']
data/lib/test_ids.rb CHANGED
@@ -19,6 +19,19 @@ module TestIds
19
19
  end
20
20
 
21
21
  class <<self
22
+ # Allocates a number to the given test and returns a new hash containing
23
+ # :bin, :softbin and :number keys.
24
+ #
25
+ # The given options hash is not modified by calling this method.
26
+ #
27
+ # Use the same arguments as you would normally pass to flow.test, the numbers
28
+ # returned will be the same as would be injected into flow.test.
29
+ def allocate(instance, options = {})
30
+ opts = options.dup
31
+ current_configuration.allocator.allocate(instance, opts)
32
+ { bin: opts[:bin], softbin: opts[:softbin], number: opts[:number] }
33
+ end
34
+
22
35
  def current_configuration
23
36
  configuration(@configuration_id)
24
37
  end
data/program/prb1.rb CHANGED
@@ -3,4 +3,5 @@ Flow.create do
3
3
  func :t1
4
4
  func :t2
5
5
  func :t3
6
+ func :t3, bin: :none, sbin: :none
6
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_ids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-14 00:00:00.000000000 Z
11
+ date: 2017-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: origen