matrix test cases