{"id":16376548,"url":"https://github.com/killercup/assert_tokens_eq","last_synced_at":"2025-07-29T09:32:28.171Z","repository":{"id":57497747,"uuid":"199720507","full_name":"killercup/assert_tokens_eq","owner":"killercup","description":"Like Rust's built-in assert_eq macro, but for token streams. Passes them through rustfmt, and shows a pretty diff","archived":false,"fork":false,"pushed_at":"2023-07-11T17:23:36.000Z","size":53,"stargazers_count":14,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T03:25:01.135Z","etag":null,"topics":["macros","rust","testing"],"latest_commit_sha":null,"homepage":"http://docs.rs/assert_tokens_eq","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/killercup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-07-30T20:11:57.000Z","updated_at":"2023-06-06T08:01:02.000Z","dependencies_parsed_at":"2024-10-28T09:14:21.441Z","dependency_job_id":"75027113-a688-40cb-8167-7e2ea3e476eb","html_url":"https://github.com/killercup/assert_tokens_eq","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"81281938d24a99aefae6fa9858a0c36b3130f63c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fassert_tokens_eq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fassert_tokens_eq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fassert_tokens_eq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/killercup%2Fassert_tokens_eq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/killercup","download_url":"https://codeload.github.com/killercup/assert_tokens_eq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227740680,"owners_count":17812687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["macros","rust","testing"],"created_at":"2024-10-11T03:25:07.271Z","updated_at":"2024-12-03T21:35:33.364Z","avatar_url":"https://github.com/killercup.png","language":"Rust","readme":"# assert_tokens_eq\n\nLike Rust's built-in `assert_eq` macro, but for token streams.\nPasses them through rustfmt,\nand shows a pretty diff\n(powered by [pretty_assertions]).\n\n[pretty_assertions]: https://crates.io/crates/pretty_assertions\n\n## How it works\n\nYou write:\n\n```rust\nlet got = something_that_generates_rust_code();\nlet expected = quote! {\n    #[no_mangle]\n    extern \"C\" fn foo(\n        input: *const ::libc::c_char,\n        input_len: ::libc::size_t,\n        input3: *const ::libc::c_int,\n        input3_len: ::libc::size_t,\n    ) {\n        fn foo(input: Arc\u003cstr\u003e, input2: Arc\u003cstr\u003e) {}\n        unimplemented!()\n    }\n};\nassert_tokens_eq!(got, expected);\n```\n\nand you get:\n\n![](./screenshot.png)\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fassert_tokens_eq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkillercup%2Fassert_tokens_eq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkillercup%2Fassert_tokens_eq/lists"}