Skip to content

Commit

Permalink
feat: Update vim-testbed which fixed 7.4.2119 python build failing; A…
Browse files Browse the repository at this point in the history
…dd expected docblocks in playground
  • Loading branch information
kkoomen committed Nov 11, 2019
1 parent a308041 commit 2795e9c
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 85 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM tweekmonster/vim-testbed:latest

RUN install_vim -tag v7.4.2119 -py -build
RUN install_vim -tag v7.4.2119 -py3 -build
RUN install_vim -tag v8.1.2000 -py3 -build
RUN install_vim -tag neovim:v0.2.0 -py3 -build
RUN install_vim -tag neovim:v0.3.8 -py3 -build
Expand Down
2 changes: 1 addition & 1 deletion ftplugin/cpp.vim
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ call add(b:doge_patterns, {
\ 'template': {
\ 'doxygen': [
\ '/**',
\ ' * !description',
\ ' * @brief !description',
\ ' *',
\ '%(parameters| * {parameters})%',
\ '%(returnType| * @return !description)%',
Expand Down
161 changes: 85 additions & 76 deletions playground/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,111 +2,111 @@
// Regular functions
// =============================================================================

class Emitter {
public:
void append_token();
}

/**
* [TODO:description]
*
* @param text [TODO:description]
* @param node [TODO:description]
* @brief
*
* @param text
* @param node
*/
void Emitter::append_token(const std::string& text, const AST_Node* node)
{
//
}

/**
* [TODO:description]
* @return [TODO:description]
* @brief
*
* @return std::vector<std::string>
*/
std::vector<std::string> someFunction();

/**
* [TODO:description]
* @return [TODO:description]
* @brief
*
* @return const next_layer_type&
*/
const next_layer_type& my_func()
{
//
}

/**
* [TODO:description]
*
* @param text [TODO:description]
* @return [TODO:description]
* @brief
*
* @param text
* @return lowest_layer_type&
*/
lowest_layer_type& my_func(std::string& text)
{
//
}

/**
* [TODO:description]
*
* @param v [TODO:description]
* @param ec [TODO:description]
* @return [TODO:description]
* @brief
*
* @param v
* @param ec
* @return ASIO_SYNC_OP_VOID
*/
ASIO_SYNC_OP_VOID myFunc(
verify_mode v, asio::error_code& ec)
{
//
}

std::string trimLine(const std::string &line);

/**
* [TODO:description]
*
* @param e [TODO:description]
* @return [TODO:description]
* @brief
*
* @param line
* @return std::string
*/
inline project::error_code my_func(ssl_errors e)
{
//
}
std::string trimLine(const std::string &line);

/**
* [TODO:description]
*
* @param type [TODO:description]
* @param handler [TODO:description]
* @return [TODO:description]
* @brief
*
* @param e
* @return project::error_code
*/
template <typename HandshakeHandler>
INITFN_RESULT_TYPE(HandshakeHandler, void (project::error_code))
myFunc(handshake_type type, MOVE_ARG(HandshakeHandler) handler)
inline project::error_code my_func(ssl_errors e)
{
//
}

/**
* [TODO:description]
*
* @param it_begin [TODO:description]
* @param _end [TODO:description]
* @return [TODO:description]
* @brief Construct a new Vector object
*
* @tparam T
* @param it_begin
* @param _end
*/
template<typename T>
Vector(std::enable_if<is_foreach_iterator<T>, T>::type& it_begin, T& _end) {
assert(N == std::distance(it_begin, it_end));
}

/**
* [TODO:description]
*
* @param p [TODO:description]
* @brief
*
* @param p
*/
void f(A* p = this)
{
//
}

/**
* [TODO:description]
*
* @param a [TODO:description]
* @param b [TODO:description]
* @return [TODO:description]
* @brief Get the Max object
*
* @tparam T
* @param a
* @param b
* @return T
*/
template <class T>
T GetMax (T a, T b) {
Expand All @@ -116,10 +116,11 @@ T GetMax (T a, T b) {
}

/**
* [TODO:description]
*
* @param i [TODO:description]
* @param args [TODO:description]
* @brief
*
* @tparam T
* @param i
* @param args
*/
template<class...T> void h(int i = 0, T... args) {
//
Expand All @@ -130,11 +131,12 @@ template<class...T> void h(int i = 0, T... args) {
// =============================================================================

/**
* [TODO:description]
*
* @param it_begin [TODO:description]
* @param _end [TODO:description]
* @return [TODO:description]
* @brief
*
* @tparam n
* @param it_begin
* @param _end
* @return std::pair<decltype(n), decltype(n)>
*/
template<auto n>
auto f(std::enable_if<is_foreach_iterator<T>, T>::type& it_begin, T& _end) -> std::pair<decltype(n), decltype(n)> // test
Expand All @@ -143,10 +145,12 @@ auto f(std::enable_if<is_foreach_iterator<T>, T>::type& it_begin, T& _end) -> st
}

/**
* [TODO:description]
*
* @param args [TODO:description]
* @return [TODO:description]
* @brief
*
* @tparam T
* @tparam Args
* @param args
* @return T*
*/
template<typename T, typename... Args>
static T* create(Args&& ... args)
Expand All @@ -155,19 +159,22 @@ static T* create(Args&& ... args)
}

/**
* [TODO:description]
*
* @param args [TODO:description]
* @return [TODO:description]
* @brief
*
* @tparam
* @param args
* @return T*
*/
template<> static T* create(Args&& ... args);

/**
* [TODO:description]
*
* @param j [TODO:description]
* @param val [TODO:description]
* @return [TODO:description]
* @brief
*
* @tparam BasicJsonType
* @tparam ValueType
* @param j
* @param val
* @return decltype(::somename::from_json(std::forward<BasicJsonType>(j), val), void())
*/
template<typename BasicJsonType, typename ValueType>
static auto
Expand All @@ -179,14 +186,16 @@ static auto
}

/**
* [TODO:description]
*
* @param fun [TODO:description]
* @param args [TODO:description]
* @return [TODO:description]
* @brief
*
* @tparam F
* @tparam Args
* @param fun
* @param args
* @return decltype(auto)
*/
template<class F, class... Args>
decltype(auto) PerfectForward(F fun, Args&&... args)
{
//
}
}
2 changes: 1 addition & 1 deletion run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ set -e
set -u

docker_image=kkoomen/doge
current_docker_image_id=97b5bed0d9fc
current_docker_image_id=5233c4250426

DOGE_DOCKER_IMAGE="$docker_image"
export DOGE_DOCKER_IMAGE
Expand Down
12 changes: 6 additions & 6 deletions test/filetypes/cpp/functions.vader
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Given cpp (function without parameters with return type):
Do (trigger doge):
\<C-d>

Expect cpp (generated comment with nothing but a description and @return tag):
Expect cpp (generated comment with nothing but @brief and @return tag):
/**
* [TODO:description]
* @brief [TODO:description]
*
* @return [TODO:description]
*/
Expand All @@ -38,7 +38,7 @@ Do (trigger doge):
:8\<CR>
\<C-d>

Expect cpp (generated comment with a description, @param and @return tags):
Expect cpp (generated comment with @brief, @param and @return tags):
using namespace std;

class TestClass {
Expand All @@ -47,7 +47,7 @@ Expect cpp (generated comment with a description, @param and @return tags):
};

/**
* [TODO:description]
* @brief [TODO:description]
*
* @param text [TODO:description]
* @param node [TODO:description]
Expand All @@ -64,9 +64,9 @@ Given cpp (function with parameters with default values with void return type):
Do (trigger doge):
\<C-d>

Expect cpp (generated comment with a description and @param tag):
Expect cpp (generated comment with @brief and @param tag):
/**
* [TODO:description]
* @brief [TODO:description]
*
* @param p [TODO:description]
*/
Expand Down

0 comments on commit 2795e9c

Please sign in to comment.