added test snippet for cpp
This commit is contained in:
14
my_snippets/cpp.json
Normal file
14
my_snippets/cpp.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"TEST_F for g/setter": {
|
||||
"prefix": "TEST_F_getter",
|
||||
"body": [
|
||||
"TEST_F($1, test_${CLIPBOARD/m_(.*)/${1}/}_${2:setter}_${3:getter})",
|
||||
"{",
|
||||
" set${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}($4);",
|
||||
" ${5:type} result = get${CLIPBOARD/m_(.)(.*)/${1:/upcase}${2}/}();",
|
||||
" EXPECT_EQ($4, result);$0",
|
||||
"}"
|
||||
],
|
||||
"description": "Generate TEST_F body for getter and setter functions"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user