# Update \`std.testing.expectEqual\` and friends to use peer type resolution · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/e5994f5f573a51de4e604824355cac28b5ab4eba)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: e5994f5f573a51de4e604824355cac28b5ab4eba

Requested commit: e5994f5f573a51de4e604824355cac28b5ab4eba

Commit: e5994f5f573a51de4e604824355cac28b5ab4eba

Tree: 750920f64a1c75bf07a521d1ad820c6b8be37946

Author: Carl Åstholm

Committer: Carl Åstholm

## Message

```
Update `std.testing.expectEqual` and friends to use peer type resolution

This commit changes the type of the second parameter to `anytype`, which should make it easier to pass literals to these functions. This change shouldn't *silently* break existing code (the assertions themselves should retain the same behavior as before) but it may result in some new compile errors when struct/union/array literals or builtins like `@bitCast` are used for the second argument. These compile errors can be fixed by explicitly coercing these expressions to the correct type using `@as`.

```

## Parents

- [9a56228c2b90d94d01bb76784c77fdec5710cf0a](https://git.cafe/gitcafe/zig/commit/9a56228c2b90d94d01bb76784c77fdec5710cf0a?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/e5994f5f573a51de4e604824355cac28b5ab4eba?format=markdown)
