<commit_before># $Id$

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

require 'test/unit'
require 'racket'

class TestL2Misc <  Test::Unit::TestCase
  def test_convert
    (0..512).each {
      len = rand(512)
      mac = Racket::L2::Misc.randommac(len)
      long = Racket::L2::Misc.mac2long(mac)
      assert_equal(mac, Racket::L2::Misc.long2mac(long, len))<commit_msg>Test that proper number of : exist<commit_after># $Id$

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

require 'test/unit'
require 'racket'

class TestL2Misc <  Test::Unit::TestCase
  def test_convert
    (0..rand(1024)).each {
      len = rand(512)+1
      mac = Racket::L2::Misc.randommac(len)
      assert_equal(mac.length, (len*2) + (len-1))
      long = Racket::L2::Misc.mac2long(mac)
      assert_equal(mac, Racket::L2::Misc.long2mac(long, len))
{'fraction_non_alphanumeric': 0.18661971830985916, 'fraction_numerical': 0.035211267605633804, 'mean_word_length': 3.874285714285714, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '6300204', 'n_tokens_mistral': 338, 'n_tokens_neox': 328, 'n_words': 55}