Commit Graph
256 Commits
Author SHA1 Message Date
Le Philousophe b8e08ff2a0 COMMON: Fix Path::baseName
When baseName was called with a base name path but escaped, unescape was
called with the escaping marker while this is not allowed.
2024-05-19 21:18:34 +02:00
Hubert Maier ec863ad4ba JANITORIAL: Fix lenght typo in algorithm.h 2024-05-18 13:52:31 +02:00
Eugene Sandulenko 6c0864dd81 TESTS: Fix Base64 test 2024-05-12 23:26:20 +02:00
Little Cat 267bfc9d03 COMMON: Base64 string validation. 2024-05-12 15:08:27 +02:00
Little Cat 6b80c4c581 COMMON: Add Base64 encoding/decoding 2024-05-12 15:08:27 +02:00
Le Philousophe aceaf99816 COMMON: Fix bug #14892
When both paths were equal, suffix was incremented one char too much and
went off the string.
Add test cases to check for this.
2024-02-02 08:06:59 +01:00
Le Philousophe 5b4e26322e COMMON: Don't fail when comparing empty strings
Add tests for this.
2024-01-14 14:06:41 +01:00
Cameron Cawley 0a4fec83c0 COMMON: Improve removing characters from strings 2024-01-08 23:39:22 +01:00
Cameron Cawley a8183c7734 COMMON: Insert all characters in one go with String::insertString() 2024-01-08 23:39:22 +01:00
Cameron Cawley 4abc229268 COMMON: Unify implementations of String::replace() 2024-01-08 23:39:22 +01:00
Le Philousophe eeba7ca153 COMMON: Add more path functions 2023-12-24 13:19:25 +01:00
Le Philousophe be7130f296 COMMON: Rework path storage 2023-12-24 13:19:25 +01:00
Matthew Duggan ce76f5b8cf COMMON: Add basic tests for quicktime parser 2023-11-18 21:03:02 +01:00
Cameron Cawley 953772ba99 COMMON: Rename memset2/4/8 to memset16/32/64 2023-11-06 13:40:38 +02:00
Cameron Cawley ac2d99ee9b COMMON: Add variants of memset for 16-bit, 32-bit and 64-bit values 2023-11-06 13:40:38 +02:00
Eugene Sandulenko 3bce81ac70 TESTS: Added test for String::chop() method 2023-09-17 00:56:28 +02:00
Le Philousophe 3b4e8a4eea TEST: Add CxxTest ValueTraits for String
This allows pretty printing them when there is an assertion failure
2023-09-02 11:42:29 +02:00
Le Philousophe f41cf652eb TEST: Fix warnings 2023-08-30 13:41:34 +02:00
Le Philousophe 509043aa92 TEST: Fix warning about signedness 2023-08-30 13:41:19 +02:00
Le Philousophe f34bef6840 COMMON: Add normalization to Path class 2023-07-09 21:41:58 +02:00
grisenti 661e9373e3 TEST: Add tests for Common::upperBound 2023-06-01 23:07:41 +02:00
grisenti 1a696c1d6f TEST: Add tests for Common::lowerBound 2023-06-01 23:06:39 +02:00
hax0kartik 4924a35540 TEST: Add more testcases for Common::remove() 2023-06-01 16:32:03 +02:00
hax0kartik 698bb261d1 COMMON: Add remove() to algorithm 2023-06-01 16:32:03 +02:00
Eugene Sandulenko 0f3424be05 TESTS: Rename clashing global variables 2023-05-15 14:32:29 +02:00
elasota f30ab9b70f TEST: Add test for comment prefixed by whitespace. 2023-05-11 00:22:14 +03:00
hax0kartik 0c9e17c57c TESTS: Add U32String::replace() tests 2023-02-27 22:01:13 +01:00
D G Turner de16ed814b TEST: Fix Misleading Indentation GCC Compiler Warnings in Common::Crc tests 2023-02-20 01:49:57 +00:00
Matthew Duggan c53b42311d COMMON: Fix path split+join combinations, add tests for same
This resolves multiple scenarios where a path ends up with a trailing
separator.
2022-12-31 17:57:07 +09:00
Cameron Cawley 4002c7bdde COMMON: Add a version of Common::Array::resize with a fill value 2022-12-19 14:33:07 +02:00
Cameron Cawley a55361b65d COMMON: Add Common::Array::swap() 2022-12-18 23:36:09 +02:00
Cameron Cawley 28d7b361ea COMMON: Move more file format code into common/formats 2022-12-11 22:33:23 +01:00
Cameron Cawley 0581301b24 COMMON: Move huffman.h back out of the compression directory 2022-12-11 22:33:23 +01:00
Eugene Sandulenko fb7095f5a4 COMMON: Move all compression-related files to a separate directory 2022-12-01 11:53:02 +01:00
Vladimir Serbinenko 357249fb5a COMMON: Split slow and fast CRC implementation
They have almost nothing in common. And we probably want to kill slow
implementation anyway now that we have tests
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko 05f1a0df51 COMMON: Remove the need for most reflecting when initing reflected table
Instead reflect the polynomial and change the shifts. Also removes the
need for explicit init.

This makes our crc more similar to its standard implementation
2022-11-29 01:05:31 +01:00
Vladimir Serbinenko 35bac4e58c COMMON: Add tests for CRC 2022-11-29 01:05:31 +01:00
Sergio d136a5f54c COMMON: fix String::rfind for default value of pos (max value of size_t) 2022-11-26 23:13:42 +02:00
Cameron Cawley 3441c7230d COMMON: Fix handling escaped percents in Common::U32String::format 2022-11-20 14:23:30 +01:00
Cameron Cawley 29024cded7 COMMON: Fix handling negative numbers in Common::U32String::format 2022-11-20 14:23:30 +01:00
Le Philousophe ab12e7fe01 COMMON: Fix a missing str.h include
It's not included anymore in util.h
2022-10-30 19:38:35 +01:00
Le Philousophe 6524f7beb5 COMMON: Forbid use of unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
Roland van Laar 407902599e TESTS: Fix clang++ warning
./test/common/md5.h:17:3: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
                "345678901234567890"
2022-10-06 19:01:15 +02:00
Roland van Laar 70e715b6f8 TESTS: Fix compiler warnings integer comparisons
Use suffix `U` for integers when comparing results of `size`.
Use uints in the forloops.
2022-10-06 17:41:41 +02:00
Roland van Laar 07478b38be TESTS: plug memory leaks in span tests
Declare dataPtr as a byte pointer instead of a void pointer to
be able to delete it at the end of the test.
2022-10-06 16:12:27 +02:00
Roland van Laar e78a88e2fb TESTS: plug memory leaks
Use `clear` instead of `release` where possible.
Both clean up the span object. They differ in that `release` returns a pointer to
the internal data and `clear` destroys the internal data.
2022-10-05 18:11:10 +02:00
Cameron Cawley 0d37729ff7 COMMON: Fix reading and writing doubles from streams with older ARM toolchains 2022-07-02 12:49:22 +02:00
elasota 9fa32ac47d COMMON: Fix WeakPtr preventing object deletion 2022-04-25 18:20:19 -07:00
Matthew Duggan ddee0e76f9 COMMON: INIFile bugfixes and unit tests
This adds a lot more unit tests for Common::INIFile and fixes some small
problems identified during their creation.  Specifically:

* addSection() did not check the validity of the section name, which meant it
  was possible to create a section that could not then be operated on by the
  other functions (which all check validity)
* If allowNonEnglishCharacters was set, it was possible to create a key or
  section name starting with '[' or '#', or including a carriage return.  This
  would not read back in correctly.
* Blank section and key names were considered valid, but neither would be
  read back in correctly.
* The struct documentation did not mention whitespcae handling or that comments
  include the '#' and carriage return.
2022-04-10 19:41:06 +03:00
Matthew Duggan a74b081973 TEST: Add more tests for Common::INIFile
My initial tests were quite minimal as I was trying to fix the build.  Now more
of the basic INIFile functionality is tested.
2022-03-25 18:16:07 +09:00