<commit_before>module Week3Tests where

import Week 3
import Test.Tasty
import Test.Tasty.HUnit

week3Tests = defaultMain tests

tests :: TestTree
tests = testGroup "Tests" [unitTests]

unitTests = testGroup "Unit tests"
  [ testCase "Parse error message" $
       ValidLM (LogMessage (Error 2) 562 "help help") @=? parseMessage "E 2 562 help help"

  , testCase  "Parse Log Message" $
      ValidLM (LogMessage Info 29 "la la la") @=? parseMessage "I 29 la la la"<commit_msg>fixed test bug<commit_after>module Week3Tests where

import Week3
import Log
import Test.Tasty
import Test.Tasty.HUnit

week3Tests = defaultMain tests

tests :: TestTree
tests = testGroup "Tests" [unitTests]

unitTests = testGroup "Unit tests"
  [ testCase "Parse error message" $
       ValidLM (LogMessage (Error 2) 562 "help help") @=? parseMessage "E 2 562 help help"

  , testCase  "Parse Log Message" $
      ValidLM (LogMessage Info 29 "la la la") @=? parseMessage "I 29 la la la"
{'fraction_non_alphanumeric': 0.09345794392523364, 'fraction_numerical': 0.03115264797507788, 'mean_word_length': 4.127659574468085, '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': '5343404', 'n_tokens_mistral': 329, 'n_tokens_neox': 301, 'n_words': 116}