added test snippet for cpp
This commit is contained in:
parent
874cb95f01
commit
35552af831
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"
|
||||
}
|
||||
}
|
14
my_snippets/package.json
Normal file
14
my_snippets/package.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "my_snippets",
|
||||
"engines": {
|
||||
"vscode": "^1.11.0"
|
||||
},
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "cpp",
|
||||
"path": "./cpp.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user