mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2024-12-20 21:23:06 +00:00
021eef1000
* Add tests for Whisper::Context#full * Add Whisper::Context#full * Add tests for Whisper::Error * Add document of Whisper::Context#full [skip ci] * Add additional signature for Whisper::Context#full * Add description to Whisper::Context#full * Add test for Whisper::Context#full_parallel * Add Whisper::Context#full_parallel * Hide Whisper's instance methods from Ruby code * Add class to test MemoryView * Build test class before running test * Add test for MemoryView * Make Whisper::Context#full and #full_parallel accept MemoryView * Use Ruby 3.1 on CI * Add comment on samples data type * Update README * Update README * Remove unused code
21 lines
449 B
Ruby
21 lines
449 B
Ruby
require_relative "helper"
|
|
|
|
class TestError < TestBase
|
|
def test_error
|
|
error = Whisper::Error.new(-2)
|
|
assert_equal "failed to compute log mel spectrogram", error.message
|
|
assert_equal -2, error.code
|
|
end
|
|
|
|
def test_unknown_error
|
|
error = Whisper::Error.new(-20)
|
|
assert_equal "unknown error", error.message
|
|
end
|
|
|
|
def test_non_int_code
|
|
assert_raise TypeError do
|
|
error = Whisper::Error.new("non int")
|
|
end
|
|
end
|
|
end
|