Class: SQLite3::TestSQLite3

Inherits:
TestCase
  • Object
show all
Defined in:
lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb,
lib/sqlite3-1.5.3-x86_64-darwin/test/test_sqlite3.rb

Instance Method Summary collapse

Methods inherited from TestCase

#assert_nothing_raised

Instance Method Details

#test_compiled_version_and_loaded_versionObject



26
27
28
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb', line 26

def test_compiled_version_and_loaded_version
  assert_equal(SQLite3::SQLITE_VERSION, SQLite3::SQLITE_LOADED_VERSION)
end

#test_libversionObject



5
6
7
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb', line 5

def test_libversion
  assert_not_nil SQLite3.libversion
end

#test_threadsafeObject



9
10
11
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb', line 9

def test_threadsafe
  assert_not_nil SQLite3.threadsafe
end

#test_threadsafe?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
18
19
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb', line 13

def test_threadsafe?
  if SQLite3.threadsafe > 0
    assert SQLite3.threadsafe?
  else
    refute SQLite3.threadsafe?
  end
end

#test_version_stringsObject



21
22
23
24
# File 'lib/sqlite3-1.5.3-arm64-darwin/test/test_sqlite3.rb', line 21

def test_version_strings
  skip if SQLite3::VERSION.include?("test") # see set-version-to-timestamp rake task
  assert_equal(SQLite3::VERSION, SQLite3::VersionProxy::STRING)
end