Core (tests/scale_test): Rewrite in C++