Title: Go. Assertions for structures should be accurate · Issue #1809 · UnitTestBot/UTBotJava · GitHub
Open Graph Title: Go. Assertions for structures should be accurate · Issue #1809 · UnitTestBot/UTBotJava
X Title: Go. Assertions for structures should be accurate · Issue #1809 · UnitTestBot/UTBotJava
Description: Description Now tests generated for Go structures have assertNotEquals for the whole structure. Actual and expected structures have only one different field. If some other field is different in actual and expected structures, the test wi...
Open Graph Description: Description Now tests generated for Go structures have assertNotEquals for the whole structure. Actual and expected structures have only one different field. If some other field is different in act...
X Description: Description Now tests generated for Go structures have assertNotEquals for the whole structure. Actual and expected structures have only one different field. If some other field is different in act...
Opengraph URL: https://github.com/UnitTestBot/UTBotJava/issues/1809
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Go. Assertions for structures should be accurate","articleBody":"**Description**\r\n\r\nNow tests generated for Go structures have `assertNotEquals` for the whole structure. \r\nActual and expected structures have only one different field.\r\nIf some other field is different in actual and expected structures, the test will pass too.\r\n\r\n**Context**\r\n\r\nfor example:\r\n`utbot-go/go-samples/simple/supported_types_go_ut_test.go` see `TestStructWithNanByUtGoFuzzer`\r\n\r\n**Actual behavior**\r\n\r\n```go\r\nassert.NotEqual(t, Structure{int: -1, int8: 1, int16: 32767, int32: -1, int64: -1, uint: 18446744073709551615, uint8: 0, uint16: 1, uint32: 0, uint64: 18446744073709551615, uintptr: 18446744073709551615, float32: 0.02308184, float64: math.NaN(), complex64: complex(float32(0.02308184), float32(0.02308184)), complex128: complex(0.9412491794821144, 0.9412491794821144), byte: 0, rune: -1, string: \"\", bool: false}, actualVal)\r\n```\r\n\r\n**Expected behavior**\r\n\r\n```go\r\nassert.NotEqual(t, math.NaN(), actualVal.float64)\r\n```\r\n\r\n**Environment**\r\n\r\nIntelliJ IDEA 2022.1 - 2022.2 Ultimate/Community\r\nGoLand 2022.2\r\n","author":{"url":"https://github.com/alisevych","@type":"Person","name":"alisevych"},"datePublished":"2023-02-17T09:43:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/1809/UTBotJava/issues/1809"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6b4236bc-cfc8-4723-33e8-3bffc1c54a37 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 939A:25F4A6:12C8284:19C2A9C:698DAE72 |
| html-safe-nonce | c8c3ce433cad5825aba0f63c992254279e5ebe502ca89763ed65f00a1247f330 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzlBOjI1RjRBNjoxMkM4Mjg0OjE5QzJBOUM6Njk4REFFNzIiLCJ2aXNpdG9yX2lkIjoiNTAxMjk5NDc1MDU4NTYxMzkzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0eeb739dcc60b988a412d168cec33a33dbddb1c0e1ef8da91529928d78d3db9b |
| hovercard-subject-tag | issue:1589050125 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/UnitTestBot/UTBotJava/1809/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d27af8b4b99791e418bf548f4de29f51ffe55947bb710aff38bd18bccc835921/UnitTestBot/UTBotJava/issues/1809 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d27af8b4b99791e418bf548f4de29f51ffe55947bb710aff38bd18bccc835921/UnitTestBot/UTBotJava/issues/1809 |
| og:image:alt | Description Now tests generated for Go structures have assertNotEquals for the whole structure. Actual and expected structures have only one different field. If some other field is different in act... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alisevych |
| hostname | github.com |
| expected-hostname | github.com |
| None | 8c7947c0c592efeab6162b9909ad11fa43bff8b0cb5ff43273dc25e41979d43e |
| turbo-cache-control | no-preview |
| go-import | github.com/UnitTestBot/UTBotJava git https://github.com/UnitTestBot/UTBotJava.git |
| octolytics-dimension-user_id | 87413538 |
| octolytics-dimension-user_login | UnitTestBot |
| octolytics-dimension-repository_id | 480810501 |
| octolytics-dimension-repository_nwo | UnitTestBot/UTBotJava |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 480810501 |
| octolytics-dimension-repository_network_root_nwo | UnitTestBot/UTBotJava |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | b22a9fbf4dea601ec149a9e5362e0558df79b505 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width