cgen 0.16.10 → 0.16.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f3c9caebbcfcf578bd5877bacb6dcc0b2786ac41
4
- data.tar.gz: 7bc92dd9303689f9fb0e9636c63c8265d54344b3
3
+ metadata.gz: 23be69eb176d0c1bbb8a6677a0e238550bf08447
4
+ data.tar.gz: 552130bebe132b9a9b27069a71d9929908effb18
5
5
  SHA512:
6
- metadata.gz: 0600620f4408bcc9fc5f4eb6557f192fe7538445665184b408f6460986d793532f836b020e66db1e82deef399f6e47ed1b312efd38f69eb1f8095d95edfa98f8
7
- data.tar.gz: ac8c34a7e85ce8bb888613b47bb26f039a629eac6ff736a6eb0511c2710b3c28c02283c3c3a00b1945240aff0949bd0afdf3d4de4554f2bb58d09cfd6dd63c42
6
+ metadata.gz: 47fb968642d78e27aac3d969e9c3e03c516d5e184af37b9c3c9b01cbb27dfb53473c2148cacd9e05407be2d74c7c05916a90af611301f74dff9b78764606aa67
7
+ data.tar.gz: 047ca40d309f65f4f856c717c64972ae843f76849c904dd0b028960dc584b6ee37a8faa18c3bb0dadce3c2d70abbca879d7e2ad77751967f11f8f1d3538bcaf0
@@ -0,0 +1,13 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+
4
+ def cur_ruby
5
+ require 'rbconfig'
6
+ @cur_ruby ||= RbConfig::CONFIG["RUBY_INSTALL_NAME"]
7
+ end
8
+
9
+ desc "Run unit tests"
10
+ Rake::TestTask.new :test do |t|
11
+ t.libs << "lib"
12
+ t.test_files = FileList["test/test-*.rb"]
13
+ end
@@ -418,7 +418,7 @@ require 'cgen/inherit'
418
418
  # way that makes clear that the problem is really with commit.
419
419
  module CGenerator
420
420
 
421
- VERSION = '0.16.8'
421
+ VERSION = '0.16.11'
422
422
 
423
423
  class Accumulator ## should be a mixin? "Cumulative"?
424
424
 
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'cgen/cshadow'
3
3
 
4
4
  #
@@ -11,7 +11,7 @@ class AttributeSample
11
11
  include CShadow
12
12
  end
13
13
 
14
- class AttributeTest < Test::Unit::TestCase
14
+ class AttributeTest < Minitest::Test
15
15
  def default_test; end
16
16
  end
17
17
 
@@ -434,7 +434,7 @@ class MarshalSample < AttributeSample
434
434
  attr_accessor :t
435
435
  end
436
436
 
437
- class MarshalTest < Test::Unit::TestCase
437
+ class MarshalTest < Minitest::Test
438
438
  def test_marshal_ivars
439
439
  ms = MarshalSample.new
440
440
  ms.x = ["a", :b]
@@ -473,7 +473,7 @@ class MarshalTest < Test::Unit::TestCase
473
473
  end
474
474
 
475
475
  require 'fileutils'
476
- dir = File.join("tmp", RUBY_VERSION)
476
+ dir = File.join(File.dirname(__FILE__), "tmp", RUBY_VERSION)
477
477
  FileUtils.mkpath dir
478
478
  Dir.chdir dir do
479
479
  AttributeSample.commit
@@ -1,8 +1,8 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'cgen/cgen'
3
3
 
4
4
 
5
- class BasicTemplateTest < Test::Unit::TestCase
5
+ class BasicTemplateTest < Minitest::Test
6
6
 
7
7
  class BasicTemplate < CGenerator::Template
8
8
  accumulator(:acc0, :acc1, :acc2)
@@ -30,7 +30,7 @@ class BasicTemplateTest < Test::Unit::TestCase
30
30
  end
31
31
 
32
32
 
33
- class CFragmentTest < Test::Unit::TestCase
33
+ class CFragmentTest < Minitest::Test
34
34
 
35
35
  class CodeTemplate < CGenerator::CFragment
36
36
  accumulator(:decl) {StatementKeyAccumulator}
@@ -67,7 +67,7 @@ class CFragmentTest < Test::Unit::TestCase
67
67
  end
68
68
 
69
69
 
70
- class LibraryTest < Test::Unit::TestCase
70
+ class LibraryTest < Minitest::Test
71
71
  class Sample
72
72
  end
73
73
 
@@ -105,7 +105,7 @@ class LibraryTest < Test::Unit::TestCase
105
105
  @lib.after_commit { @@ba << 4 }
106
106
 
107
107
  require 'fileutils'
108
- dir = File.join("tmp", RUBY_VERSION)
108
+ dir = File.join(File.dirname(__FILE__), "tmp", RUBY_VERSION)
109
109
  FileUtils.mkpath dir
110
110
  Dir.chdir dir do
111
111
  @lib.commit
@@ -1,4 +1,4 @@
1
- require 'test/unit'
1
+ require 'minitest/autorun'
2
2
  require 'cgen/cshadow'
3
3
 
4
4
  #
@@ -89,7 +89,7 @@ end
89
89
 
90
90
  # Compile-time tests (that is, pre-commit)
91
91
 
92
- class CompileTimeTestCase < Test::Unit::TestCase
92
+ class CompileTimeTestCase < Minitest::Test
93
93
  def test_conflict
94
94
  assert_raises(NameError) {
95
95
  Sub_2.class_eval {
@@ -139,7 +139,7 @@ class CompileTimeTestCase < Test::Unit::TestCase
139
139
  end
140
140
 
141
141
  require 'fileutils'
142
- dir = File.join("tmp", RUBY_VERSION)
142
+ dir = File.join(File.dirname(__FILE__), "tmp", RUBY_VERSION)
143
143
  FileUtils.mkpath dir
144
144
  Dir.chdir dir do
145
145
  EmptyBase.commit
@@ -153,7 +153,7 @@ METHOD_MISSING_ERROR =
153
153
 
154
154
  # Run-time tests (that is, post-commit)
155
155
 
156
- class EmptyBaseTestCase < Test::Unit::TestCase
156
+ class EmptyBaseTestCase < Minitest::Test
157
157
 
158
158
  def test_empty_base
159
159
  ebs1 = EBSub_1.new
@@ -176,7 +176,7 @@ class EmptyBaseTestCase < Test::Unit::TestCase
176
176
 
177
177
  end
178
178
 
179
- class BaseTestCase < Test::Unit::TestCase
179
+ class BaseTestCase < Minitest::Test
180
180
 
181
181
  def test_limited_access
182
182
  b = Sub_1.new
@@ -231,7 +231,11 @@ class BaseTestCase < Test::Unit::TestCase
231
231
  def test_protect
232
232
  a = Base.new
233
233
  b = Sub_4.new
234
- assert_nothing_raised {a.x; a.y = 2}
234
+
235
+ #assert_nothing_raised
236
+ a.x
237
+ a.y = 2
238
+
235
239
  assert_raises(METHOD_MISSING_ERROR) {
236
240
  b.x
237
241
  }
@@ -247,7 +251,7 @@ class BaseTestCase < Test::Unit::TestCase
247
251
 
248
252
  end
249
253
 
250
- class OtherBaseTestCase < Test::Unit::TestCase
254
+ class OtherBaseTestCase < Minitest::Test
251
255
 
252
256
  def test_sharing_library
253
257
  ob = OtherBase.new
@@ -263,7 +267,7 @@ end
263
267
 
264
268
  require 'yaml'
265
269
 
266
- class YamlTest < Test::Unit::TestCase
270
+ class YamlTest < Minitest::Test
267
271
 
268
272
  def test_yaml
269
273
  base = Base.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cgen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.10
4
+ version: 0.16.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joel VanderWerf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-04-05 00:00:00.000000000 Z
11
+ date: 2013-06-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Framework for dynamically generating and loading C extensions and for
14
14
  defining classes in terms of C structs.
@@ -19,6 +19,7 @@ extra_rdoc_files:
19
19
  - History.txt
20
20
  - README.md
21
21
  files:
22
+ - Rakefile
22
23
  - History.txt
23
24
  - README.md
24
25
  - lib/cgen/attribute.rb
@@ -53,7 +54,6 @@ files:
53
54
  - examples/inherit-example.txt
54
55
  - test/test-attribute.rb
55
56
  - test/test-cgen.rb
56
- - test/test.rb
57
57
  - test/test-cshadow.rb
58
58
  homepage: http://rubyforge.org/projects/cgen
59
59
  licenses: []
@@ -86,3 +86,4 @@ signing_key:
86
86
  specification_version: 4
87
87
  summary: C code generator
88
88
  test_files: []
89
+ has_rdoc:
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- def run(x)
4
- puts "-"*x.size
5
- puts x
6
- system(x)
7
- # unless system(x)
8
- # puts " ... failed: #{$?}"
9
- # end
10
- end
11
-
12
- require 'rbconfig'
13
- ruby = RbConfig::CONFIG["RUBY_INSTALL_NAME"]
14
-
15
- run "#{ruby} test-cgen.rb"
16
- run "#{ruby} test-cshadow.rb"
17
- run "#{ruby} test-attribute.rb"