Skip to main content
Share Your Experience: Take the 2024 Developer Survey
6 votes
Accepted

Unit Tests for an Arena Allocator

Here's something that's not well-defined: static inline bool is_aligned(const void *ptr, size_t byte_count) { return (uintptr_t) ptr % byte_count == 0; } Any ...
Toby Speight's user avatar
  • 75.9k
2 votes

Skeleton unit test for leetcode coding problems

What do you think of this way to begin with? Meh. Not great, but definitely better than nothing. Is it a clean way to proceed? No. Prefer one of these. Hopefully you'll choose the first one. Put ...
J_H's user avatar
  • 27.6k

Only top scored, non community-wiki answers of a minimum length are eligible