mlsanityData to 7 Oct 2026

How Many Code and Test Cases Are Enough? Evaluating Test Cases Generation from a Binary-Matrix Perspective

arXiv 2510.08720 ↗First posted 9 Oct 2025cs.CLcited by 4

Not on the map. Why?

Abstract (arXiv)

Evaluating test cases automatically generated by Large Language Models (LLMs) is a critical yet challenging task. Existing benchmarks often evaluate the exclusion ratio on large, unstructured collections of wrong codes, suffering from high computational costs and score inflation. Furthermore, they inadvertently reward generators that detect common, trivial bugs, while failing to penalize their inability to identify rare yet critical faults. In this work, we connect two fundamental questions: (1) What is the minimal set of wrong codes sufficient to represent the entire error space? and (2) What is the minimal set of test cases needed to distinguish them? We introduce a novel framework that formalizes benchmark construction as finding an optimal diagnostic basis in a binary code-test matrix, where rows represent wrong codes and columns represent test case results. The rank of this matrix specifies the minimal number of independent error patterns (wrong codes) and provides a tight upper bound on the number of test cases required for complete fault coverage. Our objective is to identify a basis of size equal to the matrix rank that maximizes internal diversity. To tackle this NP-hard problem, we propose WrongSelect, an efficient approximation algorithm to select maximally diverse wrong codes. Applying this framework to millions of competitive programming submissions, we construct TC-Bench, a compact, diverse, and inflation-resistant benchmark. Extensive experiments show that even the most advanced test case generation methods achieve only ~60% exclusion rates on TC-Bench, exposing a significant gap in their diagnostic power and highlighting substantial room for future improvement. Our dataset is available at: https://huggingface.co/datasets/Luoberta/TC-Bench and our code is at: https://github.com/Luowaterbi/TC-Bench.

Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 34 of its 47 references that are in the map. First posted on arXiv 9 Oct 2025.

Builds on

34 of 47 references.

References · 34

  1. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,146
  2. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  3. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  4. 2025GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Modelscited by 446
  5. 2022CodeT: Code Generation with Generated Testscited by 369
  6. 2022CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learningcited by 342
  7. 2024CRUXEval: A Benchmark for Code Reasoning, Understanding and Executioncited by 294
  8. 2024SWT-Bench: Testing and Validating Real-World Bug-Fixes with Code Agentscited by 129
  9. 2025KodCode: A Diverse, Challenging, and Verifiable Synthetic Dataset for Codingcited by 115
  10. 2025Efficient Reinforcement Finetuning via Adaptive Curriculum Learningcited by 88
  11. 2024o1-Coder: an o1 Replication for Codingcited by 77
  12. 2025LeetCodeDataset: A Temporal Dataset for Robust Evaluation and Efficient Training of Code LLMscited by 67
22 more
  1. 2025Co-Evolving LLM Coder and Unit Tester via Reinforcement Learningcited by 51
  2. 2024TestGenEval: A Real World Unit Test Generation and Test Completion Benchmarkcited by 49
  3. 2023ALGO: Synthesizing Algorithmic Programs with LLM-Generated Oracle Verifierscited by 41
  4. 2025CodeContests+: High-Quality Test Case Generation for Competitive Programmingcited by 39
  5. 2024Preference Optimization for Reasoning with Pseudo Feedbackcited by 38
  6. 2025Z1: Efficient Test-time Scaling with Codecited by 35
  7. 2024CodeDPO: Aligning Code Models with Self Generated and Verified Source Codecited by 32
  8. 2024TDD-Bench Verified: Can LLMs Generate Tests for Issues Before They Get Resolved?cited by 32
  9. 2025Scaling Reasoning, Losing Control: Evaluating Instruction Following in Large Reasoning Modelscited by 28
  10. 2025Towards Effective Code-Integrated Reasoningcited by 23
  11. 2025HardTests: Synthesizing High-Quality Test Cases for LLM Codingcited by 22
  12. 2025Process-Supervised Reinforcement Learning for Code Generationcited by 21
  13. 2025Rethinking Verification for LLM Code Generation: From Generation to Testingcited by 12
  14. 2025Can LLMs Generate High-Quality Test Cases for Algorithm Problems? TestCase-Eval: A Systematic Evaluation of Fault Coverage and Exposurecited by 10
  15. 2024B4: Towards Optimal Assessment of Plausible Code Solutions with Plausible Testscited by 9
  16. 2025Can LLMs Generate Reliable Test Case Generators? A Study on Competition-Level Programming Problemscited by 9
  17. 2025Klear-CodeTest: Scalable Test Case Generation for Code Reinforcement Learningcited by 9
  18. 2025ReST-RL: Reinforcing LLM Reasoning through Unified Self-Training and Value-Guided Searchcited by 9
  19. 2024AutoCoder: Enhancing Code Large Language Model with textscAIEV-Instructcited by 8
  20. 2025CLOVER: A Test Case Generation Benchmark with Coverage, Long-Context, and Verificationcited by 7
  21. 2025Towards Better Understanding of Program-of-Thought Reasoning in Cross-Lingual and Multilingual Environmentscited by 6
  22. 2025Building Coding Agents via Entropy-Enhanced Multi-Turn Preference Optimizationcited by 5

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.