Skip to content

Commit

Permalink
Expense value fix (#134)
Browse files Browse the repository at this point in the history
* added style to autocomplete cells

* Added autocomplete

* added newline to Darktheme.css

* fixed checkstyleMain FAILED

* fixed checkstyleMain FAILED 2

* fixed checkstyleMain FAILED 3

* autocomplete now shows command start with input text only and updated DeveloperGuide

* fixed conflict

* fixed conflict 2

* fixed conflict 3

* fixed conflict 4

* fixed conflict 5

* fixed conflict 6

* fixed CommandBoxTest Error

* fixed CommandBoxTest error 2

* added expense tracker feature

* added newline at the end

* travis fix 1

* travis fix 2

* travis fix 3

* Added expense trend command and monthly expense commnad

* fix 1

* fix 2

* fix 3

* documentation and minor change in implementation

* fix 1

* fix 2

* minor fix and added some tests

* travis fix 1

* minor fix

* modified UI and some fix

* travis fix

* travis fix 2

* added sequence diagram and updated UG DG

* fix typo

* select command fix for ExpenseListPanel

* select command ui fix

* travis fix

* expense value fix
  • Loading branch information
ChenSongJian authored and QzSG committed Nov 6, 2018
1 parent 2ba3fd7 commit 85103b3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public ExpenseValue(String expenseValue) {
*/
public static boolean isValidExpenseValue(String test) {
if (test.matches(EXPENSE_VALUE_VALIDATION_REGEX)) {
test = eliminateLeadingZero(test);
if (test.length() > (MAX_EXPENSE_VALUE_DIGIT + 3)) {
return false;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void isValidExpenseValue() {
assertFalse(ExpenseValue.isValidExpenseValue("100000.00")); // number is too large

// valid expense values
assertTrue(ExpenseValue.isValidExpenseValue("00000.01")); // can be entered and will be formatted to 0.01
assertTrue(ExpenseValue.isValidExpenseValue("00000000000.01")); // can be entered and will be formatted to 0.01
assertTrue(ExpenseValue.isValidExpenseValue("99999.99")); // largest numbers
}
}

0 comments on commit 85103b3

Please sign in to comment.