aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/marktree.c
diff options
context:
space:
mode:
authorJames McCoy <jamessan@jamessan.com>2024-12-03 06:34:07 -0500
committerJames McCoy <jamessan@jamessan.com>2024-12-03 06:34:07 -0500
commit48bdbf12d0db441bb565c306385a88d05b3903b2 (patch)
treeb51927471039c666003b78ddff8f620b7a2dcba0 /src/nvim/marktree.c
parentc410375d4d7df80577c66d1241069d7f9f62983a (diff)
downloadrneovim-48bdbf12d0db441bb565c306385a88d05b3903b2.tar.gz
rneovim-48bdbf12d0db441bb565c306385a88d05b3903b2.tar.bz2
rneovim-48bdbf12d0db441bb565c306385a88d05b3903b2.zip
test(marktree): expose test functions in release builds
In order to run the marktree unit test in release mode, the test functions need to be available even when NDEBUG is defined. Keep the body of marktree_check a nop during release builds, which limits the usefulness of the testing, but at least lets the tests run.
Diffstat (limited to 'src/nvim/marktree.c')
-rw-r--r--src/nvim/marktree.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/nvim/marktree.c b/src/nvim/marktree.c
index 555fef5bbd..5ccd4fd45d 100644
--- a/src/nvim/marktree.c
+++ b/src/nvim/marktree.c
@@ -2330,7 +2330,6 @@ void marktree_check(MarkTree *b)
#endif
}
-#ifndef NDEBUG
size_t marktree_check_node(MarkTree *b, MTNode *x, MTPos *last, bool *last_right,
const uint32_t *meta_node_ref)
{
@@ -2485,8 +2484,6 @@ bool mt_recurse_nodes_compare(MTNode *x, PMap(ptr_t) *checked)
return true;
}
-#endif
-
// TODO(bfredl): kv_print
#define GA_PUT(x) ga_concat(ga, (char *)(x))
#define GA_PRINT(fmt, ...) snprintf(buf, sizeof(buf), fmt, __VA_ARGS__); \