add tests for magic/specialize