Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
5389910
[C#] Generate DTOs from SBE IR for non-perf-sensitive usecases.
ZachBray Sep 27, 2023
68af4f6
[Java] Start to introduce property based testing (PBT).
ZachBray Oct 5, 2023
439ee4b
[Java] Fix typos.
ZachBray Oct 5, 2023
b94ef12
[Java] Move property tests to their own source set.
ZachBray Oct 5, 2023
ea7e84b
[Java] Suppress javadoc warnings in propertyTest source set.
ZachBray Oct 6, 2023
526eac2
[Java] Split apart schema generation files.
ZachBray Oct 6, 2023
0a2a6e4
[Java] Extend PBT to generate arbitrary encoded messages.
ZachBray Oct 6, 2023
5af0274
[Java] Test DTOs preserve information.
ZachBray Oct 7, 2023
fdf7742
[Java,C#] Make dotnet executable customisable in tests.
ZachBray Oct 10, 2023
852a0fe
[Java] Extend schema generation to include bitsets with gaps.
ZachBray Oct 10, 2023
92588c0
[Java] Use arbitrary fixed-length arrays in property tests.
ZachBray Oct 10, 2023
b205c4b
[Java] Model optional fields in property-based tests.
ZachBray Oct 11, 2023
58b0e92
[Java, C#] Add a GitHub workflow for slow checks.
ZachBray Oct 11, 2023
4f9d51b
[Java] Extend arbitrary varData encodings.
ZachBray Oct 11, 2023
77711dd
[Java, C#] Tidy up encoded message writing in tests.
ZachBray Oct 12, 2023
19f69a9
[C#] Upgrade to latest LTS .NET version.
ZachBray Oct 12, 2023
520cdb1
[C#] Generate DTOs using C# 9+ records.
ZachBray Oct 12, 2023
c1afd03
[C#] Use more-idiomatic null representations.
ZachBray Oct 17, 2023
207ab1f
[IR] Change default float and double values to minimum representable …
ZachBray Oct 18, 2023
4201789
[C#] Add validation to DTOs and improve use of records.
ZachBray Oct 18, 2023
bc17a46
[C#] Support DTO generation via system property.
ZachBray Oct 18, 2023
248eae9
[C#] Extend tests to cover extended schemas.
ZachBray Oct 19, 2023
7ee9265
[C#] Address some of Martin's feedback re "added" var data representa…
ZachBray Nov 9, 2023
1b98e1d
[C#] Address feedback around encode/decode methods.
ZachBray Nov 10, 2023
96b7032
[C++] Generate DTOs for non-perf-sensitive usecases.
ZachBray Nov 2, 2023
029fb25
[C++] Only build DTOs with compilers that support C++ 17.
ZachBray Nov 2, 2023
246e6f7
[C++] Improve naming conventions in DTOs.
ZachBray Nov 3, 2023
e33c6a8
[C++] Support "to string" without specification of buffer length.
ZachBray Nov 3, 2023
f88d345
[C++] Fix issues with length computation.
ZachBray Nov 3, 2023
f965d2a
[C++] Address feedback from Todd re var data representation.
ZachBray Nov 9, 2023
21cde2a
[C++] Add PBT for C++ DTOs.
ZachBray Nov 11, 2023
a0fc525
[Java, C++, C#] Ensure buffer is large enough to contain message.
ZachBray Nov 13, 2023
2195d6e
[CI] Fix dependency conflict in JQwik.
ZachBray Nov 11, 2023
b9ed08b
[CI] Upload slow test artifacts upon failure.
ZachBray Nov 13, 2023
b27bb68
[C#] Provide path to SBE.dll for C# property tests in CI.
ZachBray Nov 13, 2023
1e3cf8f
[Java] Adjust copyright banners.
ZachBray May 1, 2024
328cc42
[Java] Add support for DTO generation.
ZachBray May 13, 2024
41f4b0e
[Java] Extend property-based tests to exercise Java DTOs.
ZachBray May 14, 2024
75df462
[Java] Avoid checking parentMessage.actingVersion inside composite.
ZachBray May 15, 2024
60bd119
[Java] Fix remaining DTO issues uncovered with PBT.
ZachBray May 15, 2024
6e0234b
[Java] Tidy up spacing.
ZachBray May 15, 2024
File filter

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
[C++] Improve naming conventions in DTOs.
Changes: - `encode` -> `encodeWith` - `decode` -> `decodeWith`
  • Loading branch information
ZachBray committed Jun 25, 2024
commit 246e6f77a0405435881666835be2c01b73ce891c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ private void generateCompositeDecodeFrom(
final String indent)
{
final StringBuilder decodeBuilder = classBuilder.appendPublic().append("\n")
.append(indent).append("static void decode(").append(codecClassName).append("& codec, ")
.append(indent).append("static void decodeWith(").append(codecClassName).append("& codec, ")
.append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");

Expand All @@ -299,7 +299,7 @@ private void generateCompositeEncodeInto(
final String indent)
{
final StringBuilder encodeBuilder = classBuilder.appendPublic().append("\n")
.append(indent).append("static void encode(").append(codecClassName).append("& codec,")
.append(indent).append("static void encodeWith(").append(codecClassName).append("& codec,")
.append("const ").append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");

Expand All @@ -322,7 +322,7 @@ private void generateDecodeListFrom(
final String indent)
{
classBuilder.appendPublic().append("\n")
.append(indent).append("static std::vector<").append(dtoClassName).append("> decodeMany(")
.append(indent).append("static std::vector<").append(dtoClassName).append("> decodeManyWith(")
.append(codecClassName).append("& codec)\n")
.append(indent).append("{\n")
.append(indent).append(INDENT).append("std::vector<").append(dtoClassName)
Expand All @@ -334,7 +334,7 @@ private void generateDecodeListFrom(
.append(indent).append(INDENT).append(INDENT)
.append(dtoClassName).append(" dto;\n")
.append(indent).append(INDENT).append(INDENT)
.append(dtoClassName).append("::decode(codec.next(), dto);\n")
.append(dtoClassName).append("::decodeWith(codec.next(), dto);\n")
.append(indent).append(INDENT).append(INDENT)
.append("dtos[i] = dto;\n")
.append(indent).append(INDENT)
Expand All @@ -354,7 +354,7 @@ private void generateMessageDecodeFrom(
final String indent)
{
final StringBuilder decodeBuilder = classBuilder.appendPublic().append("\n")
.append(indent).append("static void decode(").append(codecClassName).append("& codec, ")
.append(indent).append("static void decodeWith(").append(codecClassName).append("& codec, ")
.append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");

Expand Down Expand Up @@ -526,7 +526,7 @@ private void generateBitSetDecodeFrom(
sb.append(")\n")
.append(indent).append("{\n");

sb.append(indent).append(INDENT).append(dtoTypeName).append("::decode(codec.")
sb.append(indent).append(INDENT).append(dtoTypeName).append("::decodeWith(codec.")
.append(formattedPropertyName).append("(), ")
.append("dto.").append(formattedPropertyName).append("());\n");

Expand All @@ -538,7 +538,7 @@ private void generateBitSetDecodeFrom(
}
else
{
sb.append(indent).append(dtoTypeName).append("::decode(codec.")
sb.append(indent).append(dtoTypeName).append("::decodeWith(codec.")
.append(formattedPropertyName).append("(), ")
.append("dto.").append(formattedPropertyName).append("());\n");
}
Expand Down Expand Up @@ -571,7 +571,7 @@ private void generateCompositePropertyDecodeFrom(
final String formattedPropertyName = formatPropertyName(propertyName);
final String dtoClassName = formatDtoClassName(typeToken.applicableTypeName());

sb.append(indent).append(dtoClassName).append("::decode(codec.")
sb.append(indent).append(dtoClassName).append("::decodeWith(codec.")
.append(formattedPropertyName).append("(), ")
.append("dto.").append(formattedPropertyName).append("());\n");
}
Expand All @@ -593,7 +593,7 @@ private void generateGroupsDecodeFrom(
final String groupDtoClassName = formatDtoClassName(groupName);

sb.append(indent).append("dto.").append(formattedPropertyName).append("(")
.append(groupDtoClassName).append("::decodeMany(codec.")
.append(groupDtoClassName).append("::decodeManyWith(codec.")
.append(formattedPropertyName).append("()));\n");

i++;
Expand Down Expand Up @@ -729,7 +729,7 @@ private void generateMessageEncodeInto(
final String indent)
{
final StringBuilder encodeBuilder = classBuilder.appendPublic().append("\n")
.append(indent).append("static void encode(").append(codecClassName).append("& codec, const ")
.append(indent).append("static void encodeWith(").append(codecClassName).append("& codec, const ")
.append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");

Expand Down Expand Up @@ -914,7 +914,7 @@ private void generateComplexPropertyEncodeInto(
final String formattedPropertyName = formatPropertyName(propertyName);
final String typeName = formatDtoClassName(typeToken.applicableTypeName());

sb.append(indent).append(typeName).append("::encode(codec.")
sb.append(indent).append(typeName).append("::encodeWith(codec.")
.append(formattedPropertyName).append("(), dto.")
.append(formattedPropertyName).append("());\n");
}
Expand Down Expand Up @@ -944,7 +944,7 @@ private void generateGroupsEncodeInto(
.append("Count(").append(formattedPropertyName).append(".size());\n\n")
.append(indent).append("for (const auto& group: ").append(formattedPropertyName).append(")\n")
.append(indent).append("{\n")
.append(indent).append(INDENT).append(groupDtoTypeName).append("::encode(").append(groupCodecVarName)
.append(indent).append(INDENT).append(groupDtoTypeName).append("::encodeWith(").append(groupCodecVarName)
.append(".next(), group);\n")
.append(indent).append("}\n\n");

Expand Down Expand Up @@ -1024,7 +1024,7 @@ private void generateDisplay(

toStringBuilder.append(", ").append("length);\n");

toStringBuilder.append(indent).append(INDENT).append("encode(codec, *this);\n")
toStringBuilder.append(indent).append(INDENT).append("encodeWith(codec, *this);\n")
.append(indent).append(INDENT).append("std::ostringstream oss;\n")
.append(indent).append(INDENT).append("oss << codec;\n")
.append(indent).append(INDENT).append("return oss.str();\n")
Expand Down Expand Up @@ -1591,7 +1591,7 @@ private void generateChoiceSetEncodeInto(
{
final StringBuilder encodeBuilder = classBuilder.appendPublic()
.append("\n")
.append(indent).append("static void encode(\n")
.append(indent).append("static void encodeWith(\n")
.append(indent).append(INDENT).append(codecClassName).append("& codec, ")
.append("const ").append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");
Expand Down Expand Up @@ -1620,7 +1620,7 @@ private void generateChoiceSetDecodeFrom(
{
final StringBuilder decodeBuilder = classBuilder.appendPublic()
.append("\n")
.append(indent).append("static void decode(\n")
.append(indent).append("static void decodeWith(\n")
.append(indent).append(INDENT).append("const ").append(codecClassName).append("& codec, ")
.append(dtoClassName).append("& dto)\n")
.append(indent).append("{\n");
Expand Down