• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

technion / ruby-argon2 / 6014071009

29 Aug 2023 03:03PM UTC coverage: 99.342% (-0.7%) from 100.0%
6014071009

Pull #62

github

web-flow
Merge e81b812c0 into e4e74b80f
Pull Request #62: Make default costs RFC 9106's second preferred option; introduce named cost profiles

39 of 41 new or added lines in 3 files covered. (95.12%)

302 of 304 relevant lines covered (99.34%)

178.24 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/test/profiles_test.rb
1
# frozen_string_literal: true
2

3
require 'test_helper'
6✔
4

5
class ProfilesTest < Minitest::Test
6✔
6
  def test_hash_access
6✔
7
    assert_equal Argon2::Profiles::RFC_9106_LOW_MEMORY, Argon2::Profiles[:RFC_9106_LOW_MEMORY]
6✔
8
  end
9

10
  def test_to_a
6✔
11
    # rubocop:disable Naming/VariableNumber
12
    assert_equal %i[
6✔
13
      pre_rfc_9106
14
      rfc_9106_high_memory
15
      rfc_9106_low_memory
16
      unsafe_cheapest
17
    ], Argon2::Profiles.to_a.sort
18
    # rubocop:enable Naming/VariableNumber
19
  end
20

21
  def test_to_h
6✔
22
    hash = Argon2::Profiles.to_h
6✔
23
    assert_equal Argon2::Profiles::RFC_9106_HIGH_MEMORY, hash[:rfc_9106_high_memory]
6✔
24
  end
25

26
  def test_structure
6✔
27
    Argon2::Profiles.to_h.values do |profile|
6✔
NEW
28
      assert_equal %i[t_cost m_cost p_cost], profile.keys
×
NEW
29
      assert(profile.values.all? { |v| v.instance_of?(Integer) })
×
30
    end
31
  end
32
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc