V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
westDoor
V2EX  ›  Java

swtich 语句 要怎么才能单元测试完全覆盖??

  •  
  •   westDoor · Mar 5, 2019 · 2398 views
    This topic created in 2614 days ago, the information mentioned may be changed or developed.

    所有的 case 案例都写了,还提示有分支没覆盖到。

    SoloCompany
        1
    SoloCompany  
       Mar 5, 2019
    即使没有 else 分支也需要覆盖啊
    就好比一个 if 语句你不能说只覆盖 true 分支就 100% 吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   997 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:15 · PVG 02:15 · LAX 11:15 · JFK 14:15
    ♥ Do have faith in what you're doing.