Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variadic record elements #67

Merged
merged 8 commits into from
Jan 28, 2021
Merged

Variadic record elements #67

merged 8 commits into from
Jan 28, 2021

Conversation

dlurton
Copy link
Member

@dlurton dlurton commented Jan 18, 2021

Implements #44.

This builds on #60, which should be merged first.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dlurton dlurton self-assigned this Jan 18, 2021
@dlurton dlurton changed the base branch from master to generated-transforms January 18, 2021 07:05
Copy link
Member

@alancai98 alancai98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Just have a couple nits/questions

@@ -3264,6 +3273,7 @@ class TestDomain private constructor() {
val elements = listOfNotNull(
ionSymbol("human"),
firstName?.let { ionSexpOf(ionSymbol("first_name"), it.toIonElement()) },
if(middleNames.any()) { ionSexpOf(ionSymbol("middle_names"), *middleNames.map { it.toIonElement() }.toTypedArray()) } else { null },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could add a space after if for consistency

Comment on lines +81 to +82
tc.messageMustContainStrings.forEach {
assertTrue(ex.message!!.contains(it), "exception message must contain '$it'")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Hmm is there a better way to check the exception messages? Perhaps something similar to what is done in TypeDomainParserErrorsTest.kt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd agree that would be better but that part of the code isn't currently factored to do that and doing so should be a separate effort.

@dlurton dlurton changed the base branch from generated-transforms to master January 28, 2021 17:58
@dlurton dlurton merged commit 7e9ae0f into master Jan 28, 2021
@dlurton dlurton deleted the variadic-record-elements branch June 16, 2021 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants