<commit_before>'use strict'

var tape = require('tape')
var roundRat = require('../lib/round-rat')
var BN = require('bn.js')

tape('round-rational', function(t) {

  t.equals(roundRat(new BN(1), new BN(1)), 1)
  t.equals(roundRat(new BN(1), new BN(2)), 0.5)

  t.end()
})<commit_msg>add some more test cases<commit_after>'use strict'

var tape = require('tape')
var roundRat = require('../lib/round-rat')
var BN = require('bn.js')

tape('round-rational', function(t) {

  t.equals(roundRat(new BN(1), new BN(1)), 1)
  t.equals(roundRat(new BN(1), new BN(2)), 0.5)
  t.equals(roundRat(new BN(0), new BN(1)), 0)
  t.equals(roundRat(new BN(-1), new BN(1)), -1)
  t.equals(roundRat(new BN(1), new BN(-1)), -1)
  t.equals(roundRat(new BN(-1), new BN(-1)), 1)
  t.equals(roundRat(new BN(1), new BN(-4)), -0.25)


  t.end()
})
{'fraction_non_alphanumeric': 0.22954822954822954, 'fraction_numerical': 0.03785103785103785, 'mean_word_length': 4.359477124183006, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2164712', 'n_tokens_mistral': 382, 'n_tokens_neox': 336, 'n_words': 77}