Sha256: 01a64e8db6b65738df82e61f257949a9313f25f11f9d4e037477142345f6f246

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

require 'spec_helper'
require 'libsql/sqlite3'
require 'rbconfig'

describe "::Libsql::SQLite3::Status" do
  it "knows how much memory it has used" do
    ::Libsql::SQLite3.status.memory_used.current.should be >= 0
    ::Libsql::SQLite3.status.memory_used.highwater.should be >= 0
  end

  it "can reset the highwater value" do
    before = ::Libsql::SQLite3.status.memory_used.highwater
    before.should be > 0

    current = ::Libsql::SQLite3.status.memory_used.current
    ::Libsql::SQLite3.status.memory_used.reset!
    ::Libsql::SQLite3.status.memory_used.highwater.should be == current

    after = ::Libsql::SQLite3.status.memory_used.highwater
    after.should_not eql(before)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
libsql-0.1.0-x64-mingw-ucrt spec/sqlite3/status_spec.rb
libsql-0.1.0-x64-mingw32 spec/sqlite3/status_spec.rb
libsql-0.1.0-x86-mingw32 spec/sqlite3/status_spec.rb
libsql-0.1.0 spec/sqlite3/status_spec.rb