-
Notifications
You must be signed in to change notification settings - Fork 0
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
18-transform-to-and-from-angularlocalize #31
18-transform-to-and-from-angularlocalize #31
Conversation
assert.Equal(t, tt.expected.Language, result.Language) | ||
assert.ElementsMatch(t, tt.expected.Messages, result.Messages) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed random test failing, due to result.Messages
order could be different than in tt.expected.Messages
, which cause assert.Equal()
to fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In golang, the key order in the map is indeterministic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not a map, it is []model.Message
.
assert.Equal({msg1, msg2}, {msg2, msg1}) // = false
assert.ElementsMatch({msg1, msg2}, {msg2, msg1}) // = true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, but under the hood, it uses maps in the flow, doesn't it? In your implementation you are testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did not catch that
@@ -1,6 +1,6 @@ | |||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated file changed as a side effect of upgrading bufbuild
Integration tests passing
return nil, fmt.Errorf("marshal xliff12 struct to XLIFF 1.2 formatted XML: %w", err) | ||
} | ||
|
||
dataWithHeader := append([]byte(xml.Header), data...) // prepend generic XML header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…nto 18-transform-to-and-from-angularlocalize
…dated xliff12 test
* #19 Transform-to-and-from-POT * #19 Transform-to-and-from-POT * #19 Tidy * #19 minor fixes * #19 minor fixes * #19 minor fixes * #19 fixes * #19 changed multiline msgdid and msgstr * #19 modified ToPot function * #19 fixes * #19 modified multiline functionality * #19 added error to lexer function * #19 added quoted string support in lex function and made fixes * #19 changed fully Lex function because of gocognit * #19 changed PoTag -> poTag * #19 changed identifiers to private * #19 added comment multiline support * #19 fixes * #34 transform to and from XMB * 17-transform-to-and-from-arb (#20) * File-upload2 (#13) * 21-download-file (#22) * Instrument traces (OpenTelemetry) (#24) * #27 Upgraded earthly to 0.7 (#28) * #25 Added configuration from various sources (#29) * 32-transform-to-and-from-xliff-2 (#33) * 18-transform-to-and-from-angularlocalize (#31) * Renamed table test fields for consistency (#38) --------- Co-authored-by: Vladislavs Perkaņuks <[email protected]>
No description provided.