<commit_before>//@@author A0164212U
package seedu.task.model.task;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class RecurringFrequencyTest {

    @Test
    public void isValidFrequency() {
        // invalid frequency
        assertFalse(RecurringFrequency.isValidFrequency("")); // empty string
        assertFalse(RecurringFrequency.isValidFrequency(" ")); // spaces only
        assertFalse(RecurringFrequency.isValidFrequency("2malpha")); // valid priority followed by alpha characters
        assertFalse(RecurringFrequency.isValidFrequency("2h alpha"));
        // valid priority followed by alpha char separated by space
        assertFalse(RecurringFrequency.isValidFrequency(".1h")); // decimal hour
        assertFalse(RecurringFrequency.isValidFrequency(".1d")); // decimal day
        assertFalse(RecurringFrequency.isValidFrequency(".1m")); // decimal month

        // valid frequency
        assertTrue(RecurringFrequency.isValidFrequency("1h")); // one digit hour
        assertTrue(RecurringFrequency.isValidFrequency("10h")); // two digit hour
        assertTrue(RecurringFrequency.isValidFrequency("1d")); // one digit day
        assertTrue(RecurringFrequency.isValidFrequency("10d")); // two digit day
        assertTrue(RecurringFrequency.isValidFrequency("1m")); // one digit month
        assertTrue(RecurringFrequency.isValidFrequency("10m")); // two digit month
    }

}<commit_msg>fixed frequency test<commit_after>//@@author A0164212U
package seedu.task.model.task;

import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class RecurringFrequencyTest {

    @Test
    public void isValidFrequency() {
        // invalid frequency
        assertFalse(RecurringFrequency.isValidFrequency("")); // empty string
        assertFalse(RecurringFrequency.isValidFrequency(" ")); // spaces only
        assertFalse(RecurringFrequency.isValidFrequency("2malpha")); // valid priority followed by alpha characters
        assertFalse(RecurringFrequency.isValidFrequency("2y alpha"));
        // valid priority followed by alpha char separated by space
        assertFalse(RecurringFrequency.isValidFrequency(".1y")); // decimal year
        assertFalse(RecurringFrequency.isValidFrequency(".1d")); // decimal day
        assertFalse(RecurringFrequency.isValidFrequency(".1m")); // decimal month

        // valid frequency
        assertTrue(RecurringFrequency.isValidFrequency("1y")); // one digit year
        assertTrue(RecurringFrequency.isValidFrequency("10y")); // two digit year
        assertTrue(RecurringFrequency.isValidFrequency("1d")); // one digit day
        assertTrue(RecurringFrequency.isValidFrequency("10d")); // two digit day
        assertTrue(RecurringFrequency.isValidFrequency("1m")); // one digit month
        assertTrue(RecurringFrequency.isValidFrequency("10m")); // two digit month
    }

}
{'fraction_non_alphanumeric': 0.11152166610681895, 'fraction_numerical': 0.0141081625797783, 'mean_word_length': 3.8739770867430443, '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': '6719775', 'n_tokens_mistral': 793, 'n_tokens_neox': 757, 'n_words': 162}