Sha256: 5bb2912837e6fc76093fa719b9854e92e3e54b66e41430f212bcb5aeaeafc6a1

Contents?: true

Size: 451 Bytes

Versions: 9

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi_test_helper'

require 'gir_ffi/variable_name_generator'

describe GirFFI::VariableNameGenerator do
  describe '#new_var' do
    it 'generates a sequence of predictable variable names' do
      gen = GirFFI::VariableNameGenerator.new

      assert_equal '_v1', gen.new_var
      assert_equal '_v2', gen.new_var
      assert_equal '_v3', gen.new_var
      assert_equal '_v4', gen.new_var
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.11.1 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.11.0 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.10.2 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.10.1 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.10.0 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.10.0.pre1 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.9.5 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.9.4 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.9.3 test/gir_ffi/variable_name_generator_test.rb