You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_win32ole_variant.rb
    path of file: ./repos/artichoke/artichoke-backend/vendor/ruby/test/win32ole
    
    the code of the file until where you have to start completion: # frozen_string_literal: false
begin
  require 'win32ole'
rescue LoadError
end
require "test/unit"

if defined?(WIN32OLE_VARIANT)

  class TestWIN32OLE_VARIANT < Test::Unit::TestCase
    def setup
      @orglocale = WIN32OLE.locale
      WIN32OLE.locale = 0x0409 # set locale  US-Eng
    end

    def teardown
      WIN32OLE.locale = @orgl
    
    def test_s_new_with_non_nil
      obj = WIN32OLE_VARIANT.new(2, WIN32OLE::VARIANT::VT_I2)
      assert_equal(2, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_I2, obj.vartype)

      obj = WIN32OLE_VARIANT.new(3, WIN32OLE::VARIANT::VT_I4)
      assert_equal(3, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_I4, obj.vartype)

      obj = WIN32OLE_VARIANT.new(4.5, WIN32OLE::VARIANT::VT_R4)
      assert_equal(4.5, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_R4, obj.vartype)

      obj = WIN32OLE_VARIANT.new(5.5, WIN32OLE::VARIANT::VT_R8)
      assert_equal(5.5, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_R8, obj.vartype)

      obj = WIN32OLE_VARIANT.new(600, WIN32OLE::VARIANT::VT_CY)
      assert_equal("600", obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_CY, obj.vartype)

      obj = WIN32OLE_VARIANT.new("2001-06-15 12:17:34", WIN32OLE::VARIANT::VT_DATE)
      assert_equal(Time.new(2001,06,15,12,17,34), obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_DATE, obj.vartype)

      obj = WIN32OLE_VARIANT.new("foo", WIN32OLE::VARIANT::VT_BSTR)
      assert_equal("foo", obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_BSTR, obj.vartype)

      obj = WIN32OLE_VARIANT.new(true, WIN32OLE::VARIANT::VT_BOOL)
      assert_equal(true, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_BOOL, obj.vartype)

      obj = WIN32OLE_VARIANT.new(2, WIN32OLE::VARIANT::VT_I1)
      assert_equal(2, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_I1, obj.vartype)

      obj = WIN32OLE_VARIANT.new(3, WIN32OLE::VARIANT::VT_UI1)
      assert_equal(3, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_UI1, obj.vartype)

      obj = WIN32OLE_VARIANT.new(4, WIN32OLE::VARIANT::VT_UI2)
      assert_equal(4, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_UI2, obj.vartype)

      obj = WIN32OLE_VARIANT.new(5, WIN32OLE::VARIANT::VT_UI4)
      assert_equal(5, obj.value)
      assert_equal(WIN32OLE::VARIANT::VT_UI4, obj.vartype)

      if defined?(WIN32OLE::VARIANT::VT_I8)
        obj = WIN32OLE_VARIANT.new(-123456789012345, WIN32OLE::VARIANT::VT_I8)
        assert_equal(-123456789012345, obj.value)
        assert_equal(WIN32OLE::VARIANT::VT_I8, obj.vartype)
      end