Skip to content

Commit

Permalink
Handle positive numbers prefixed with + sign
Browse files Browse the repository at this point in the history
Added new test cases for positive numbers with + prefixed and provided
fix for floating point numbers starting with "+" sign followed
immediately by "." (e.g. +.14)
  • Loading branch information
Failproofshark authored and luismbo committed Oct 30, 2017
1 parent 9059e42 commit c7ca3f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions parse-number.lisp
Expand Up @@ -186,6 +186,11 @@
:start (1+ start)
:end end
:radix radix)))
((#\+)
(parse-positive-real-number string
:start (1+ start)
:end end
:radix radix))
((#\#)
(case (char string (1+ start))
((#\x #\X)
Expand Down
2 changes: 1 addition & 1 deletion tests.lisp
Expand Up @@ -10,7 +10,7 @@
'("1" "-1" "1034" "3." "-3." "-364" "80/335" "1.3214" "3.5333" "2.4E4" "6.8d3" "#xFF"
"#b-1000" "#o-101/75" "13.09s3" "35.66l5" "21.4f2" "#C(1 2)"
"#c ( #xF #o-1 ) " "#c(1d1 2s1)" "#16rFF" "#9r10" "#C(#9r44/61 4f4)"
"2.56 ")
"2.56 " "+1" "+1." "+1.4" "+.14" "+0.14")
"These are the values that are going to be tested.")

(defparameter *expected-failures* ()
Expand Down

0 comments on commit c7ca3f9

Please sign in to comment.