westDoor
V2EX  ›  Java

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

  •  
  •   westDoor · Mar 5, 2019 · 2511 views
    This topic created in 2661 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   ·   5725 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 06:35 · PVG 14:35 · LAX 23:35 · JFK 02:35
    ♥ Do have faith in what you're doing.