Skip to content
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
e85418b
issue-2282: PL changes
shewitt-au May 31, 2025
bbace8d
Remove debugging code
shewitt-au May 31, 2025
9d63054
Hard to get every one. time...
shewitt-au May 31, 2025
db3c947
Hard to get every one
shewitt-au May 31, 2025
1b5c8f6
WIP
shewitt-au Jun 1, 2025
e1b869d
WIP
shewitt-au Jun 1, 2025
fdf3df4
WIP
shewitt-au Jun 1, 2025
ad24e44
WIP
shewitt-au Jun 1, 2025
c004860
WIP
shewitt-au Jun 1, 2025
b2606d8
WIP
shewitt-au Jun 1, 2025
1214cd8
WIP
shewitt-au Jun 1, 2025
4295ce6
WIP
shewitt-au Jun 1, 2025
5e0b38b
WIP
shewitt-au Jun 1, 2025
ab9a3a9
WIP
shewitt-au Jun 1, 2025
f7d6fc0
WIP
shewitt-au Jun 1, 2025
2ac6ba9
WIP
shewitt-au Jun 1, 2025
c5496e1
WIP
shewitt-au Jun 1, 2025
29be2d2
WIP
shewitt-au Jun 2, 2025
4e07ab2
Taking a slightly different approach
shewitt-au Jun 2, 2025
8ea5dc4
Add 'construct_shared_object.hpp'
shewitt-au Jun 2, 2025
324a136
WIP
shewitt-au Jun 2, 2025
3ec6ae2
WIP
shewitt-au Jun 2, 2025
9489b3c
It builds
shewitt-au Jun 2, 2025
c6095e6
Change comment
shewitt-au Jun 2, 2025
830d0ee
fix: post_construct not being called on some compilers
shewitt-au Jun 3, 2025
ce784c4
Attempt and strange problem casuing build isssues
shewitt-au Jun 3, 2025
32037d1
Attempt and strange problem casuing build isssues
shewitt-au Jun 3, 2025
8a008a2
Attempt and strange problem casuing build isssues
shewitt-au Jun 3, 2025
7c0884b
Replace more make_shared calls
shewitt-au Jun 3, 2025
a47cc5f
Work on unit tests
shewitt-au Jun 3, 2025
e1fd97a
Work on unit tests
shewitt-au Jun 3, 2025
b17db3f
Work on unit tests
shewitt-au Jun 3, 2025
093a4e1
Work on unit tests
shewitt-au Jun 3, 2025
c40fbe3
Work on unit tests
shewitt-au Jun 3, 2025
ab43e67
Work on unit tests
shewitt-au Jun 3, 2025
bb5bc62
Work on unit tests
shewitt-au Jun 3, 2025
36deb13
Fixing tests
shewitt-au Jun 4, 2025
3eb2833
Fixing tests
shewitt-au Jun 4, 2025
cab951b
Fixing tests
shewitt-au Jun 4, 2025
8e82fdd
Fixing tests
shewitt-au Jun 4, 2025
6173dfc
Fixing tests
shewitt-au Jun 4, 2025
21fa172
Make all patterns I could find have protected constructors
shewitt-au Jun 4, 2025
3291051
Change static cast to dynamic
shewitt-au Jun 5, 2025
29b7486
Moved friend declations to end of class
shewitt-au Jun 5, 2025
c308e82
New allocation method (WIP)
shewitt-au Jun 6, 2025
1fd2401
It's looking like it may actually buid. We'll soon know
shewitt-au Jun 6, 2025
e380aeb
Last claims premature
shewitt-au Jun 6, 2025
aaae498
Move stuff around
shewitt-au Jun 6, 2025
9694a1c
New allocation method. Other small changes
shewitt-au Jun 7, 2025
13ec0b8
Renamed some stuff
shewitt-au Jun 8, 2025
cbd3f62
Renamed some stuff
shewitt-au Jun 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Work on unit tests
  • Loading branch information
shewitt-au committed Jun 3, 2025
commit ab43e672d8b2dabdb5f64b65ceec803c1b4489b0
44 changes: 22 additions & 22 deletions tests/include/test_patterns/test_pattern_bitfields.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,49 @@ namespace pl::test {

std::vector<std::shared_ptr<Pattern>> bitfieldFields;
{
bitfieldFields.push_back(create<PatternBitfieldField>("", "a", 0x25, 0, 2, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "b", 0x25, 2, 3, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "a", 0x25, 0, 2, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "b", 0x25, 2, 3, 0, testBitfield->reference()));

auto nestedBitfield = create<PatternBitfield>("NestedBitfield", "c", 0x25, 5, 4 * 2, 0);
std::vector<std::shared_ptr<Pattern>> nestedFields;
{
nestedFields.push_back(create<PatternBitfieldField>("", "nestedA", 0x25, 5, 4, 0, testBitfield.reference()));
nestedFields.push_back(create<PatternBitfieldField>("", "nestedB", 0x26, 1, 4, 0, testBitfield.reference()));
nestedFields.push_back(create<PatternBitfieldField>("", "nestedA", 0x25, 5, 4, 0, testBitfield->reference()));
nestedFields.push_back(create<PatternBitfieldField>("", "nestedB", 0x26, 1, 4, 0, testBitfield->reference()));
}
nestedBitfield->setParent(testBitfield.reference());
nestedBitfield->setParent(testBitfield->reference());
nestedBitfield->setFields(std::move(nestedFields));
nestedBitfield->setEndian(std::endian::big);
bitfieldFields.push_back(std::move(nestedBitfield));

bitfieldFields.push_back(create<PatternBitfieldField>("", "d", 0x26, 5, 4, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "e", 0x27, 1, 4, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "d", 0x26, 5, 4, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "e", 0x27, 1, 4, 0, testBitfield->reference()));

auto array = create<PatternBitfieldArray>("NestedBitfield", "f", 0x27, 5, 4 * 4, 0);
std::vector<std::shared_ptr<Pattern>> arrayEntries;
{
auto array0Bitfield = create<PatternBitfield>("NestedBitfield", "[0]", 0x27, 5, 4 * 2, 0);
std::vector<std::shared_ptr<Pattern>> array0Fields;
{
array0Fields.push_back(create<PatternBitfieldField>("", "nestedA", 0x27, 5, 4, 0, array0Bitfield.reference()));
array0Fields.push_back(create<PatternBitfieldField>("", "nestedB", 0x28, 1, 4, 0, array0Bitfield.reference()));
array0Fields.push_back(create<PatternBitfieldField>("", "nestedA", 0x27, 5, 4, 0, array0Bitfield->reference()));
array0Fields.push_back(create<PatternBitfieldField>("", "nestedB", 0x28, 1, 4, 0, array0Bitfield->reference()));
}
array0Bitfield->setParent(array.reference());
array0Bitfield->setParent(array->reference());
array0Bitfield->setFields(std::move(array0Fields));
array0Bitfield->setEndian(std::endian::big);
arrayEntries.push_back(std::move(array0Bitfield));

auto array1Bitfield = create<PatternBitfield>("NestedBitfield", "[1]", 0x28, 5, 4 * 2, 0);
std::vector<std::shared_ptr<Pattern>> array1Fields;
{
array1Fields.push_back(create<PatternBitfieldField>("", "nestedA", 0x28, 5, 4, 0, array1Bitfield.reference()));
array1Fields.push_back(create<PatternBitfieldField>("", "nestedB", 0x29, 1, 4, 0, array1Bitfield.reference()));
array1Fields.push_back(create<PatternBitfieldField>("", "nestedA", 0x28, 5, 4, 0, array1Bitfield->reference()));
array1Fields.push_back(create<PatternBitfieldField>("", "nestedB", 0x29, 1, 4, 0, array1Bitfield->reference()));
}
array1Bitfield->setParent(array.reference());
array1Bitfield->setParent(array->reference());
array1Bitfield->setFields(std::move(array1Fields));
array1Bitfield->setEndian(std::endian::big);
arrayEntries.push_back(std::move(array1Bitfield));
}
array->setParent(testBitfield.reference());
array->setParent(testBitfield->reference());
array->setEntries(arrayEntries);
array->setEndian(std::endian::big);
bitfieldFields.push_back(std::move(array));
Expand Down Expand Up @@ -107,14 +107,14 @@ namespace pl::test {

std::vector<std::shared_ptr<Pattern>> bitfieldFields;
{
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag0", 0x03, 7, 1, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag1", 0x03, 6, 1, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag2", 0x03, 5, 1, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag3", 0x03, 4, 1, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag4", 0x03, 3, 1, 0, testBitfield.reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag5", 0x03, 2, 1, 0, testBitfield.reference()));

auto enumField = create<PatternBitfieldFieldEnum>("Enum", "enumerated", 0x02, 4, 6, 0, testBitfield.reference());
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag0", 0x03, 7, 1, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag1", 0x03, 6, 1, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag2", 0x03, 5, 1, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag3", 0x03, 4, 1, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag4", 0x03, 3, 1, 0, testBitfield->reference()));
bitfieldFields.push_back(create<PatternBitfieldField>("", "flag5", 0x03, 2, 1, 0, testBitfield->reference()));

auto enumField = create<PatternBitfieldFieldEnum>("Enum", "enumerated", 0x02, 4, 6, 0, testBitfield->reference());
std::map<std::string, PatternEnum::EnumValue> values;
{
values.insert({ "A", { 0x39, 0x39 } });
Expand Down
Loading