Sha256: f78a64452a37046d1f16b3e2fe8f203ce3b6f104813b2bd523ffa05732100ab9

Contents?: true

Size: 452 Bytes

Versions: 4

Compression:

Stored size: 452 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

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.15.3 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.15.2 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.15.1 test/gir_ffi/variable_name_generator_test.rb
gir_ffi-0.15.0 test/gir_ffi/variable_name_generator_test.rb