problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::baseball_game 命名空间参考

  1. Baseball Game
更多...

class  Solution
 

函数

 TEST (baseball_game, case1)
 
 TEST (baseball_game, case2)
 
 TEST (baseball_game, case3)
 

详细描述

  1. Baseball Game

函数说明

◆ TEST() [1/3]

leetcode::baseball_game::TEST ( baseball_game  ,
case1   
)

在文件 leetcode_test.cpp2460 行定义.

2460 {
2461 vector<string> ops = {"5", "2", "C", "D", "+"};
2462 ASSERT_EQ(30, Solution::calPoints(ops));
2463 }

引用了 leetcode::baseball_game::Solution::calPoints().

◆ TEST() [2/3]

leetcode::baseball_game::TEST ( baseball_game  ,
case2   
)

在文件 leetcode_test.cpp2465 行定义.

2465 {
2466 vector<string> ops = {"5", "-2", "4", "C", "D", "9", "+", "+"};
2467 ASSERT_EQ(27, Solution::calPoints(ops));
2468 }

引用了 leetcode::baseball_game::Solution::calPoints().

◆ TEST() [3/3]

leetcode::baseball_game::TEST ( baseball_game  ,
case3   
)

在文件 leetcode_test.cpp2470 行定义.

2470 {
2471 vector<string> ops = {"1"};
2472 ASSERT_EQ(1, Solution::calPoints(ops));
2473 }

引用了 leetcode::baseball_game::Solution::calPoints().