set up the basic testing scheme.
parent
090e23d31e
commit
d0dbf70e48
|
@ -1,4 +1,4 @@
|
|||
Distribution Date: 17.7.2016 (dd.mm.yyyy)
|
||||
Distribution Date: 18.7.2016 (dd.mm.yyyy)
|
||||
|
||||
Thank you for contributing to the 4coder project!
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ popd
|
|||
pushd ..\build
|
||||
|
||||
REM call "%CODE_DIR%\buildsuper.bat" ..\code\4coder_default_bindings.cpp
|
||||
call "%CODE_DIR%\buildsuper.bat" ..\code\power\4coder_experiments.cpp
|
||||
call "%CODE_DIR%\buildsuper.bat" ..\code\internal_4coder_tests.cpp
|
||||
REM call "%CODE_DIR%\buildsuper.bat" ..\code\power\4coder_casey.cpp
|
||||
REM call "%CODE_DIR%\buildsuper.bat" ..\4vim\4coder_chronal.cpp
|
||||
if %ERRORLEVEL% neq 0 (set FirstError=1)
|
||||
|
|
|
@ -11,8 +11,45 @@ Allen Webster
|
|||
|
||||
// TOP
|
||||
|
||||
#include "test_this.cpp"
|
||||
#define LOTS_OF_FILES "w:/4ed/data/lots_of_files"
|
||||
|
||||
#define TEST_TIME_B()
|
||||
#define TEST_TIME_E()
|
||||
|
||||
|
||||
|
||||
#include "4coder_default_include.cpp"
|
||||
#include "4coder_default_building.cpp"
|
||||
|
||||
CUSTOM_COMMAND_SIG(load_lots_of_files){
|
||||
TEST_TIME_B();
|
||||
|
||||
File_List list = app->get_file_list(app, literal(LOTS_OF_FILES));
|
||||
File_Info *info = list.infos;
|
||||
|
||||
for (int i = 0; i < list.count; ++i, ++info){
|
||||
if (!info->folder){
|
||||
app->create_buffer(app, info->filename, info->filename_len, BufferCreate_Background);
|
||||
}
|
||||
}
|
||||
|
||||
app->free_file_list(app, list);
|
||||
|
||||
TEST_TIME_E();
|
||||
}
|
||||
|
||||
static void
|
||||
test_get_bindings(Bind_Helper *context){
|
||||
begin_map(context, mapid_global);
|
||||
|
||||
bind(context, key_f3, MDFR_NONE, load_lots_of_files);
|
||||
|
||||
end_map(context);
|
||||
}
|
||||
|
||||
#define BIND_4CODER_TESTS(context) test_get_bindings(context)
|
||||
|
||||
#include "power/4coder_experiments.cpp"
|
||||
|
||||
|
||||
// BOTTOM
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
#define NO_BINDING
|
||||
#include "4coder_default_bindings.cpp"
|
||||
|
||||
#ifndef BIND_4CODER_TESTS
|
||||
# define BIND_4CODER_TESTS(context) ((void)context)
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
CUSTOM_COMMAND_SIG(kill_rect){
|
||||
|
@ -404,6 +408,8 @@ get_bindings(void *data, int size){
|
|||
bind(context, '\'', MDFR_ALT, cursor_to_surrounding_scope);
|
||||
end_map(context);
|
||||
|
||||
BIND_4CODER_TESTS(context);
|
||||
|
||||
int result = end_bind_helper(context);
|
||||
return(result);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue