multiarray 0.2.1 → 0.2.2

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/Makefile CHANGED
@@ -2,7 +2,7 @@
2
2
  .SUFFIXES: .gem .o .cc .hh .rb .tar .gz .bz2
3
3
 
4
4
  RUBY_VERSION = 1.8
5
- MULTIARRAY_VERSION = 0.2.1
5
+ MULTIARRAY_VERSION = 0.2.2
6
6
 
7
7
  CP = cp
8
8
  RM = rm -Rf
@@ -1,5 +1,17 @@
1
1
  module Hornetseye
2
2
 
3
+ class MultiArray
4
+
5
+ class << self
6
+
7
+ def new( element_type, *shape )
8
+ Hornetseye::MultiArray( element_type, *shape ).new
9
+ end
10
+
11
+ end
12
+
13
+ end
14
+
3
15
  def MultiArray( element_type, *shape )
4
16
  if shape.empty?
5
17
  element_type
data/source.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
  Gem::Specification.new do |s|
3
3
  s.name = %q{multiarray}
4
- s.version = '0.2.1'
4
+ s.version = '0.2.2'
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.date = Date.today.to_s
7
7
  s.summary = %q{Multi-dimensional and uniform Ruby arrays}
@@ -0,0 +1,30 @@
1
+ require 'test/unit'
2
+ Kernel::require 'multiarray'
3
+
4
+ class TC_MultiArray < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @@types = [ Hornetseye::UBYTE,
8
+ Hornetseye::BYTE,
9
+ Hornetseye::USINT,
10
+ Hornetseye::SINT,
11
+ Hornetseye::UINT,
12
+ Hornetseye::INT,
13
+ Hornetseye::ULONG,
14
+ Hornetseye::LONG ]
15
+ end
16
+
17
+ def teardown
18
+ @@types = nil
19
+ end
20
+
21
+ def test_multiarray_new
22
+ for t in @@types
23
+ m = Hornetseye::MultiArray.new t, 3, 2
24
+ m.set
25
+ assert_equal [ [ 0, 0, 0 ], [ 0, 0, 0 ] ], m.to_a
26
+ end
27
+ end
28
+
29
+ end
30
+
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'tc_int'
3
3
  require 'tc_sequence'
4
-
4
+ require 'tc_multiarray'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiarray
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Wedekind
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-10 00:00:00 +00:00
12
+ date: 2009-12-11 00:00:00 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -37,20 +37,21 @@ files:
37
37
  - COPYING
38
38
  - lib/multiarray.rb
39
39
  - lib/multiarray/sequence_.rb
40
- - lib/multiarray/composite_type.rb
41
- - lib/multiarray/multiarray.rb
42
- - lib/multiarray/sequence.rb
43
- - lib/multiarray/list.rb
44
- - lib/multiarray/descriptortype.rb
45
- - lib/multiarray/type_operation.rb
46
- - lib/multiarray/type.rb
47
40
  - lib/multiarray/storage.rb
41
+ - lib/multiarray/type_operation.rb
42
+ - lib/multiarray/list.rb
43
+ - lib/multiarray/sequence.rb
48
44
  - lib/multiarray/int_.rb
49
- - lib/multiarray/memory.rb
45
+ - lib/multiarray/multiarray.rb
46
+ - lib/multiarray/composite_type.rb
47
+ - lib/multiarray/type.rb
48
+ - lib/multiarray/descriptortype.rb
50
49
  - lib/multiarray/sequence_operation.rb
50
+ - lib/multiarray/memory.rb
51
+ - test/tc_sequence.rb
52
+ - test/tc_multiarray.rb
51
53
  - test/ts_multiarray.rb
52
54
  - test/tc_int.rb
53
- - test/tc_sequence.rb
54
55
  has_rdoc: yard
55
56
  homepage: http://wedesoft.github.com/multiarray/
56
57
  licenses: []
@@ -80,5 +81,6 @@ signing_key:
80
81
  specification_version: 3
81
82
  summary: Multi-dimensional and uniform Ruby arrays
82
83
  test_files:
83
- - test/tc_int.rb
84
84
  - test/tc_sequence.rb
85
+ - test/tc_multiarray.rb
86
+ - test/tc_int.rb