154 Commits

Author SHA1 Message Date
Leszek Swirski
e6777f2eef Allow JSON empty exponent as trailing junk
Revert #251, and instead allow an invalid trailing empty exponent to be
treated as junk data in JSON parsing. Expand the test suite to test this
case, including testing the trailing junk.
2024-07-23 14:56:42 +02:00
Leszek Swirski
b57207c811 Disallow empty exponent in JSON parsing
The JSON spec requires at least one digit in the exponential part, if
specified.
2024-07-22 12:34:58 +02:00
Daniel Lemire
797e3e0bc2 more fixes 2024-01-28 16:01:46 -05:00
Daniel Lemire
a0ea962bf5 more fixes 2024-01-28 15:18:40 -05:00
Daniel Lemire
4dcbd30d3f More robust tests for C++23 2024-01-28 15:00:27 -05:00
Daniel Lemire
9da74ca5fb minor fixes 2024-01-28 12:49:00 -05:00
Daniel Lemire
c7e45fea9f
Merge pull request #229 from MTahaK/main
Support for float32_t and float64_t
2024-01-28 11:43:54 -05:00
Daniel Lemire
a642af5235
Merge pull request #236 from fastfloat/issue235
Verify and fix issue 235
2024-01-28 11:43:35 -05:00
Daniel Lemire
7977ec6054 fix 2024-01-28 11:11:19 -05:00
Daniel Lemire
5334e2ba94 fix 2024-01-28 10:55:02 -05:00
Daniel Lemire
1d97749791 Verify and fix issue 235 2024-01-28 10:47:21 -05:00
Daniel Lemire
620376ad39
Merge branch 'main' into main 2024-01-28 10:09:56 -05:00
Daniel Lemire
f320619216
Merge pull request #227 from fastfloat/extra_test
adding a single test
2024-01-28 10:08:49 -05:00
StefanBruens
7f46adc19c Make tests depending on supplemental_test_files optional
As the supplemental_test_files are quite large, it is useful to make
running the tests depending on it optional.

By default, the tests are kept enabled, but can be switched of by setting
`FASTFLOAT_SUPPLEMENTAL_TEST=OFF`.

Fixes: #232
2023-12-26 02:23:30 +01:00
TheRandomGuy146275
26a5b2eb16 Added test case for ignoring leading zeros for all bases
- added: fix incorrect base for leading zeros test

---------

Co-authored-by: Marvin <marvin.wu@mail.utoronto.ca>
Co-authored-by: Maya Warrier <34803055+mayawarrier@users.noreply.github.com>
2023-12-13 17:22:51 -05:00
MTahaK
96c0059fe9 Revised implementation of float32_t and float64_t support as template specializations, added test 2023-12-13 00:33:16 -05:00
Maya Warrier
30b3165520 Fix fast_int test Werrors 2023-12-12 22:45:14 -05:00
Maya Warrier
01e8c50a33 Fix bugs in tests/fast_int.cpp 2023-12-12 22:35:34 -05:00
Maya Warrier
5fcc62a6f5 Merge contributed tests 2023-12-12 22:03:33 -05:00
Marvin
ebc15bec51 Added test case for numbers within range after converted from base 2023-12-12 20:20:05 -05:00
Marvin
0711006266 Fixed messages 2023-12-12 19:23:43 -05:00
MTahaK
ae99db48e6 Updated CMakeLists with new option for C++23 fixed width tests, added new basic fixedwidthtest file. 2023-12-12 19:19:06 -05:00
Marvin
681eb1ea38 More details to basic test error for debugging 2023-12-12 19:18:07 -05:00
Marvin
5fda2cc240 Debugging results 2023-12-12 19:07:51 -05:00
MTahaK
f330ec1e9d Reverted CMakeLists changes, modifed workflow for g++13 & C++23. 2023-12-12 18:59:59 -05:00
MTahaK
b0f4535781 Update test/CMakeLists.txt to use C++23 for fixed-width float types 2023-12-12 18:11:09 -05:00
TheRandomGuy146275
e4702e039f Fixing cmake errrors 2023-12-12 17:58:32 -05:00
Marvin
20c9375c5e Added new test cases for out of range errors that cover 8,16,32,64 bits, out of range errors for all bases (64 bit only), and fixed some test cases 2023-12-12 13:59:18 -05:00
Marvin
e60b47455b Added test cases that coverunsigned, out or range errors, char pointers, invalid bases, and out of range bases 2023-12-11 18:17:33 -05:00
Marvin
2fb59699db Added more test cases that checks for correct errors, base 2, octal, and hex 2023-12-11 01:22:48 -05:00
Marvin
a91521f5a0 Added basic tests for fast_int in fast_int.cpp 2023-12-10 23:40:27 -05:00
Daniel Lemire
604424b624 adding a test 2023-12-06 21:17:09 -05:00
Daniel Lemire
7646f819a8 Merge branch 'main' of github.com:allenbarnett5/fast_float_ftn into fortran 2023-09-15 09:43:27 -04:00
Daniel Lemire
e6b370dc2c
Merge pull request #220 from mayawarrier/main
Add support for parsing numbers according to JSON format
2023-09-15 09:18:39 -04:00
Maya Warrier
7b1fc2f95d Add an option to allow inf/nan even in json mode
- Most JSON parsers offer this option too
2023-09-14 21:07:22 -04:00
Maya Warrier
ce562d9c65 Disallow inf/nan in json mode 2023-09-14 20:51:26 -04:00
Maya Warrier
2395482ad5 Ignore FASTFLOAT_ALLOWS_LEADING_PLUS for JSON format 2023-09-14 19:50:21 -04:00
Daniel Lemire
cd5160a007 Adding more tests. 2023-09-14 10:32:59 -04:00
Daniel Lemire
a79f2d9841 More tests. 2023-09-14 10:28:08 -04:00
Daniel Lemire
2eb7b2ebda Adding a couple of tests. 2023-09-14 10:13:55 -04:00
Maya Warrier
4de8d715e6 Add json fmt test 2023-09-13 21:07:40 -04:00
allen.barnett@paperbirchsoftware.com
e22c027544 Allow fast_float to parse strings accepted by the Fortran internal read
function.
2023-08-07 08:39:06 -04:00
Daniel Lemire
6d223ab557 Adding C++20 tests in CI. 2023-05-23 09:41:23 -04:00
Daniel Lemire
545c184596 Stack!!! 2023-04-26 16:53:44 -04:00
Daniel Lemire
927eb9bcd2 Merge branch 'main' of https://github.com/Pharago/fast_float into other_chars 2023-04-26 16:40:09 -04:00
Daniel Lemire
ca43e6722e We need to update some of our exhaustive tests to the new API 2023-04-02 17:43:17 -04:00
Adam Lugowski
ca90e36413 Fix subnormal test fails on GCC 9 2023-03-31 17:09:36 -07:00
Adam Lugowski
37127b022f Add subnormal numbers to powers of ten table
On some platforms std::pow returns 0 instead of a subnormal number with `-ffast-math -O2` compiler options.
2023-03-30 13:14:35 -07:00
Adam Lugowski
bfee511d78 Set errc::result_out_of_range on over/underflow
Best-effort values are still returned, such as 0 for underflow and infinity for overflow, but now the returned ec is set to std::errc::result_out_of_range instead of std::errc().
2023-03-29 10:14:46 -07:00
Daniel Lemire
d7ba016c73 Fix. 2023-03-27 13:46:51 -04:00