{"action":"closed","issue":{"url":"https://api.github.com/repos/gtk-rs/gir/issues/644","repository_url":"https://api.github.com/repos/gtk-rs/gir","labels_url":"https://api.github.com/repos/gtk-rs/gir/issues/644/labels{/name}","comments_url":"https://api.github.com/repos/gtk-rs/gir/issues/644/comments","events_url":"https://api.github.com/repos/gtk-rs/gir/issues/644/events","html_url":"https://github.com/gtk-rs/gir/issues/644","id":370580893,"node_id":"MDU6SXNzdWUzNzA1ODA4OTM=","number":644,"title":"Trim in get_c_value causes gstreamer-sys-rs tests to fail.","user":{"login":"alatiera","id":16531710,"node_id":"MDQ6VXNlcjE2NTMxNzEw","avatar_url":"https://avatars0.githubusercontent.com/u/16531710?v=4","gravatar_id":"","url":"https://api.github.com/users/alatiera","html_url":"https://github.com/alatiera","followers_url":"https://api.github.com/users/alatiera/followers","following_url":"https://api.github.com/users/alatiera/following{/other_user}","gists_url":"https://api.github.com/users/alatiera/gists{/gist_id}","starred_url":"https://api.github.com/users/alatiera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alatiera/subscriptions","organizations_url":"https://api.github.com/users/alatiera/orgs","repos_url":"https://api.github.com/users/alatiera/repos","events_url":"https://api.github.com/users/alatiera/events{/privacy}","received_events_url":"https://api.github.com/users/alatiera/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-16T12:11:20Z","updated_at":"2018-11-10T19:18:20Z","closed_at":"2018-11-10T19:18:20Z","author_association":"NONE","body":"While running the [gstreamer-rs-sys][1] tests, we stumbled in an issue with the `get_c_value` function which is auto generated in `tests/abi.rs`. In the log below, there an assertion of 2 Strings that is failing cause the leading space is [being trimmed][2]. The space exists in both the `.gir` file, the C headers and the generated C test file.\r\n\r\n```\r\nrunning 2 tests\r\ntest cross_validate_layout_with_c ... ok\r\ntest cross_validate_constants_with_c ... FAILED\r\n\r\nfailures:\r\n\r\n---- cross_validate_constants_with_c stdout ----\r\nconstants ... 25 passed; 0 failed (compilation errors: 0)\r\nconstants ... 50 passed; 0 failed (compilation errors: 0)\r\nconstants ... 75 passed; 0 failed (compilation errors: 0)\r\nConstant value mismatch for GST_AUDIO_FORMATS_ALL\r\nRust: \" { S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }\"\r\nC:    \"{ S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }\"\r\nconstants ... 99 passed; 1 failed (compilation errors: 0)\r\nconstants ... 124 passed; 1 failed (compilation errors: 0)\r\nconstants ... 149 passed; 1 failed (compilation errors: 0)\r\nconstants ... 174 passed; 1 failed (compilation errors: 0)\r\nthread 'cross_validate_constants_with_c' panicked at 'FAILED: 192 passed; 1 failed (compilation errors: 0)', gstreamer-audio-sys/tests/abi.rs:126:13\r\nnote: Run with `RUST_BACKTRACE=1` for a backtrace.\r\n\r\n\r\nfailures:\r\n    cross_validate_constants_with_c\r\n\r\ntest result: FAILED. 1 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out\r\n\r\nerror: test failed, to rerun pass '-p gstreamer-audio-sys --test abi'\r\n```\r\n\r\n[1]: https://github.com/sdroege/gstreamer-sys/issues/16#issue-370295579\r\n[2]: https://github.com/sdroege/gstreamer-sys/blob/a4113052f298e0d7b1d1111bb057fab2de12ed37/gstreamer-audio-sys/tests/abi.rs#L230"}}
{"actor":{"display_login":"EPashkin"}}