Sha256: 81f0840cb59f9c75a634947f8cc961bc23d204f35c3ea3026de85f6cf66860d6

Contents?: true

Size: 565 Bytes

Versions: 13

Compression:

Stored size: 565 Bytes

Contents

require 'test_helper'

class ErrTest < GSL::TestCase

  MAX_ERRS = 64

  ERRORS = %w[
    SUCCESS FAILURE CONTINUE EDOM ERANGE EFAULT EINVAL EFAILED
    EFACTOR ESANITY ENOMEM EBADFUNC ERUNAWAY EMAXITER EZERODIV
    EBADTOL ETOL EUNDRFLW EOVRFLW ELOSS EROUND EBADLEN ENOTSQR
    ESING EDIVERGE EUNSUP EUNIMPL ECACHE ETABLE ENOPROG ENOPROGJ
    ETOLF ETOLX ETOLG EOF
  ].map { |name| GSL.const_get(name) }

  def test_number
    assert ERRORS.uniq == ERRORS
  end

  def test_message
    assert ERRORS.map { |e| GSL.strerror(e) }.uniq.size == ERRORS.size
  end

end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
gsl-2.1.0.3 test/gsl/err_test.rb
gsl-2.1.0.2 test/gsl/err_test.rb
gsl-2.1.0.1 test/gsl/err_test.rb
gsl-2.1.0 test/gsl/err_test.rb
gsl-1.16.0.6 test/gsl/err_test.rb
rb-gsl-1.16.0.5 test/gsl/err_test.rb
rb-gsl-1.16.0.4 test/gsl/err_test.rb
rb-gsl-1.16.0.3 test/gsl/err_test.rb
rb-gsl-1.16.0.3.rc1 test/gsl/err_test.rb
rb-gsl-1.16.0.2 test/gsl/err_test.rb
rb-gsl-1.16.0.1 test/gsl/err_test.rb
rb-gsl-1.16.0 test/gsl/err_test.rb
rb-gsl-1.15.3.2 test/gsl/err_test.rb