<commit_before><commit_msg>Add initial ipv6 tests<commit_after># $Id$

$:.unshift File.join(File.dirname(__FILE__), "../..", "lib")

require 'test/unit'
require 'racket'

class TestIPV6 <  Test::Unit::TestCase
  def test_init
    assert_nothing_raised() { Racket::IPv6.new }
    assert_nothing_raised() { Racket::IPv6.new(Racket::Misc.randstring(30)) }
  end

  def test_convert
    long = rand(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)
    ipv6 = Racket::L3::Misc.long2ipv6(long)

    assert_equal(long, Racket::L3::Misc.ipv62long(ipv6))
    assert_equal(ipv6, Racket::L3::Misc.long2ipv6(long))
  end
end
# vim: set ts=2 et sw=2:
{'fraction_non_alphanumeric': 0.15384615384615385, 'fraction_numerical': 0.03365384615384615, 'mean_word_length': 5.188118811881188, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6094345', 'n_tokens_mistral': 254, 'n_tokens_neox': 245, 'n_words': 39}