Sha256: 2b1a1bd1bf1f93d1a78eaa40277b353e738164bca0f55eeb7c9ece124476845f

Contents?: true

Size: 802 Bytes

Versions: 712

Compression:

Stored size: 802 Bytes

Contents

require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_helper.rb')
require 'rbbt/util/R/eval'

class TestREval < Test::Unit::TestCase
  def test_get
    Misc.benchmark(1000) do
      a = R.eval <<-EOF
    p = 12
    a = p * 2
    c(a)
      EOF
      assert_equal 12 * 2, a
    end
  end

  def test_TSV_fork
    tsv = TSV.setup({"1" => "1"},:type => :single)
      a = tsv.R <<-EOF, :R_method => :eval
    p = 12
    a = p * 2
    c(a)
      EOF

      pid = Process.fork do
        a = tsv.R <<-EOF, :R_method => :eval
    p = 12
    a = p * 2
    c(a)
        EOF
      end
      s = Process.waitpid2 pid
  end

  def test_TSV
    tsv = TSV.setup({"1" => "1"},:type => :single)
      a = tsv.R <<-EOF, :R_method => :eval
    p = 12
    a = p * 2
    c(a)
      EOF
  end
end

Version data entries

712 entries across 712 versions & 1 rubygems

Version Path
rbbt-util-5.33.17 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.16 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.15 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.14 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.13 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.12 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.11 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.9 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.8 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.7 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.6 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.5 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.4 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.3 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.2 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.1 test/rbbt/util/R/test_eval.rb
rbbt-util-5.33.0 test/rbbt/util/R/test_eval.rb
rbbt-util-5.32.30 test/rbbt/util/R/test_eval.rb
rbbt-util-5.32.28 test/rbbt/util/R/test_eval.rb
rbbt-util-5.32.27 test/rbbt/util/R/test_eval.rb