add test for compile-time check