Add magic encoding to test/constants