problemscpp
A collection of my answers to algorithm problems in c++.
载入中...
搜索中...
未找到
leetcode::simplify_path 命名空间参考

LeetCode 71. 简化路径 更多...

class  Solution
 

函数

 TEST (simplify_path, case1)
 
 TEST (simplify_path, case2)
 
 TEST (simplify_path, case3)
 
 TEST (simplify_path, case4)
 
 TEST (simplify_path, case5)
 

详细描述

LeetCode 71. 简化路径

函数说明

◆ TEST() [1/5]

leetcode::simplify_path::TEST ( simplify_path ,
case1  )

在文件 leetcode_test.cpp323 行定义.

323 {
324 ASSERT_EQ("/home", Solution::simplifyPath("/home/"));
325 }
static string simplifyPath(const string &path)

引用了 leetcode::simplify_path::Solution::simplifyPath().

◆ TEST() [2/5]

leetcode::simplify_path::TEST ( simplify_path ,
case2  )

在文件 leetcode_test.cpp327 行定义.

327 {
328 ASSERT_EQ("/", Solution::simplifyPath("/../"));
329 }

引用了 leetcode::simplify_path::Solution::simplifyPath().

◆ TEST() [3/5]

leetcode::simplify_path::TEST ( simplify_path ,
case3  )

在文件 leetcode_test.cpp331 行定义.

331 {
332 ASSERT_EQ("/home/foo", Solution::simplifyPath("/home//foo/"));
333 }

引用了 leetcode::simplify_path::Solution::simplifyPath().

◆ TEST() [4/5]

leetcode::simplify_path::TEST ( simplify_path ,
case4  )

在文件 leetcode_test.cpp335 行定义.

335 {
336 ASSERT_EQ("/c", Solution::simplifyPath("/a/./b/../../c/"));
337 }

引用了 leetcode::simplify_path::Solution::simplifyPath().

◆ TEST() [5/5]

leetcode::simplify_path::TEST ( simplify_path ,
case5  )

在文件 leetcode_test.cpp339 行定义.

339 {
340 ASSERT_EQ("/a/b/c", Solution::simplifyPath("/a//b////c/d//././/.."));
341 }

引用了 leetcode::simplify_path::Solution::simplifyPath().