Chris Hennes
10d1102b84
Merge pull request #12007 from chennes/toponamingElementNameComparator
...
App/Toponaming: Add Comparator for mapped elements
2024-01-19 09:20:59 -06:00
Chris Hennes
32d47402b6
Tests/Toponaming: Add tests for ElementNameComparator
...
This verifies the existing functionality, but does not alter it. Two tests are disabled because they represent cases that the current code does not handle correctly. They are edge cases that are not expected in real code.
2024-01-16 19:25:38 -06:00
Ladislav Michl
7a955c5600
Tests: Avoid use of fmtlib when not needed
2024-01-15 17:38:56 +01:00
Andrei Pozolotin
6a54591bac
Resolve #11825 - no automatic quantity conversion: App::anyToQuantity
2024-01-11 11:32:18 -06:00
Stefan Brüns
5b7fe70483
[App] Fix segfault due to missing Py_Initialize in StringIDRefTest
...
The PyObject desctructor requires an initialized interpreter, otherwise
PyGILState_Ensure crashes.
Fixes #11878
2024-01-10 22:34:04 -06:00
Chris Hennes
2067470b2e
App/Toponaming: Add basic tests for CGD serialization
2023-11-08 17:11:32 -06:00
wmayer
0b0e9effeb
tests: add initApplication() to avoid code duplications
2023-10-21 16:31:26 -05:00
wmayer
b197473842
Tests: suppress warning about intened self-assignment
2023-10-11 15:12:42 +02:00
wmayer
e6bd1f10e9
App: the function findLicense() uses the '==' operator to compare two C strings.
...
This is wrong and leads to failures under Windows.
2023-10-10 13:31:10 +02:00
Chris Hennes
e36e16de59
Merge pull request #10667 from chennes/toponamingHasherToDocument
...
App/Toponaming: Add StringHasher to Document
2023-09-20 13:31:02 -05:00
Pesc0
108e2c175f
fix qbytearray length out of bound
2023-09-19 12:38:27 -05:00
wmayer
ecad77057a
Tests: fix a memory leak in StringIDRefTest::getPyObject
2023-09-18 14:58:38 +02:00
Chris Hennes
ef91d82daf
App/Toponaming: Add a few tests for Document
2023-09-17 13:13:37 -05:00
Chris Hennes
2a386c9f6f
App/Toponaming: Add StringHasher to Document
2023-09-17 13:13:37 -05:00
pre-commit-ci[bot]
222a2520b1
[pre-commit.ci] auto fixes from pre-commit.com hooks
...
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
1a960286a4
Tests: Reformat to current clang-format standard
2023-09-03 09:51:42 -05:00
wmayer
d623e37e5e
Test: add more unit tests
2023-08-26 13:17:53 +02:00
Chris Hennes
2ad35ea03e
App/Toponaming: Add tests for findTagInElementName
...
Also apply clang-tidy to that function, and fix an error with the postfix return.
2023-07-15 22:47:08 -05:00
Chris Hennes
e7f8f26bd5
App/Toponaming: Basic tests and linter issues
2023-07-14 23:03:18 -05:00
Pesc0
4a8d3853ba
[Toponaming] create ElementMap class ( #9175 )
...
* Copypaste ElementMap
* Add MappedNameRef
* Fix missing include
* Copypaste `findTagInElementName`
* fix error introduced _somewhere_
* refactor toponaming constants
* Move `findTagInElementName` in `MappedName`
* reintroduce workaround to compile ElementMap
* Added missing functions copied from complexgeodata
* fix last compile errors, reorder and format files
* remove recursive refs to ComplexGeoData
* Add more comments
* fixed comments and added tests
* added FIXME, make functions private, misc fixes
* Move static functions from complexGeoData to PostfixStringReferences. Rename to ElementNamingUtils
* Fix broken includes due to previous change
* Revert constants from string to const char*
* added childmap tests and made hasher public
* Make functions private
* Added remaining tests
* removed bool return from `erase` functions
* fix missing appexport
Co-authored-by: John Dupuy <jdupuy98@gmail.com >
2023-06-15 09:05:24 -05:00
Chris Hennes
43abb34698
App/Toponaming: Adjust StringHasher tests
2023-05-11 16:41:52 -05:00
Chris Hennes
ec98b5e498
App/Toponaming: StringHasher tests, commenting, and cleanup
2023-05-11 14:34:36 -05:00
Chris Hennes
2ef98bfdc0
App/Toponaming: Stubs of tests for StringHasher
2023-05-11 14:34:36 -05:00
Chris Hennes
e461f1bc27
App/Toponaming: Fix Reader tests for Linux
2023-05-11 14:34:35 -05:00
Chris Hennes
0d8cce1be5
App/Toponaming: Unit tests for StringIDRef
2023-05-11 14:34:35 -05:00
Chris Hennes
c9f73bda9e
App/Toponaming: Minor refactoring and tests for StringID
2023-05-11 14:34:35 -05:00
Chris Hennes
2e5f43e69b
App/Toponaming: Add missing include to Writer
2023-05-11 14:34:35 -05:00
berniev
de1acd926e
simplifying a function
...
Dramatic simplification of legacy code by separating code and data and applying some later C++.
Function removed from Application.cpp as it was in a anonymous namespace and could not easily be subjected to unit testing.
Added ProgramOptionsUtilities.h
2023-04-07 12:37:05 +02:00
Chris Hennes
e04bf47d8d
Formatting: Apply pre-commit to tests/src
2023-04-06 08:07:53 +02:00
luzpaz
0f42e9ed09
Toponaming: fix whitespace in App/MappedName.cpp
2023-04-01 15:21:01 +00:00
Chris Hennes
71fb0a584a
App/Toponaming: Add test for EDGE2<EDGE12
2023-03-25 11:22:12 -05:00
Chris Hennes
8b74cd3255
App/Toponaming: Add tests to MappedElement
2023-03-24 10:05:09 -05:00
Ajinkya Dahale
43858ce9ba
[Core] Create ElementMap and tests
...
Test is a dummy for now. `ElementMap.h` only contains const values.
2023-03-22 21:53:23 +05:30
Pesc0
dce458d1e8
Added all tests and minor fixes
2023-03-19 02:55:24 +01:00
Chris Hennes
88a06ce6d5
App/Toponaming: Add IndexedName tests for MappedName class
2023-03-19 01:57:54 +01:00
Pesc0
2721a83a08
Improved some tests
2023-03-19 01:32:29 +01:00
Pesc0
86333b210d
Remove use of = operator in object construction
2023-03-19 00:41:13 +01:00
Pesc0
5e5719a435
Fixed tests
2023-03-18 19:44:18 +01:00
Pesc0
6a6cda538f
Use AAA pattern in test suite
2023-03-17 01:43:34 +01:00
Pesc0
1562179bdc
MappedName unit tests almost complete
2023-03-17 01:43:34 +01:00
Pesc0
62246b951a
Added initial tests to MappedName
2023-03-17 01:43:34 +01:00
Pesc0
5600c564be
Added MappedName class
2023-03-17 01:42:53 +01:00
Chris Hennes
cc9387aa3f
App: Clean up IndexedName and add tests
...
Fixes the matching algorithm when provided a vector of existing names:
The original algorithm was equivalent to a 'startswith' algorithm, when it should
have been testing for exact and complete string equality. This also does some
refactoring to rename and clarify variables and functions, simplifies some
functions by using standard library calls when possible, and addresses various
linter complaints. It also applies our current clang-format to the files.
Co-authored-by: Ajinkya Dahale <AjinkyaDahale@users.noreply.github.com >
2023-03-14 13:08:23 -05:00
wmayer
da98cfc4d1
Test: fix license unit test
2023-03-11 03:19:59 +01:00
luzpaz
6802bed99d
Fix various typos and whitespace
2023-03-10 14:40:46 +01:00
berniev
0a5e59adae
an example of using constexpr array for data
...
simplifies code and removes the need for a class.
2023-03-07 23:22:44 +01:00
wmayer
e2c9b32ebe
Test: add unit tests for expressions with operator
2023-02-26 09:00:27 +01:00
wmayer
b55a5682ad
Tests: add unit tests for expression tokenizer
2023-02-26 09:00:27 +01:00
Chris Hennes
377c1564d1
Test(Metadata): Remove catch from Setup()
...
If an exception occurs while setting up Xerces-C, make the test framework handle it.
Also add a copyright header, and try to quiet down the clang-tidy linter.
2023-02-13 23:46:37 -06:00
wmayer
3623dbd862
tests: add unit tests for License
2023-02-12 19:57:41 +01:00