浏览代码

test debugging

master
FelixBrendel 6 年前
父节点
当前提交
f34c111c2d
共有 5 个文件被更改,包括 29 次插入16 次删除
  1. +1
    -1
      3rd/ftb
  2. +13
    -0
      bin/tests/modules.slime
  3. +1
    -4
      src/eval.cpp
  4. +1
    -1
      src/memory.cpp
  5. +13
    -10
      src/testing.cpp

+ 1
- 1
3rd/ftb

@@ -1 +1 @@
Subproject commit 7b128b33c97060bb5a76be8d969d5318fb2cf65c
Subproject commit 60e32530367957861d503d2b6228d650d7f3b6ac

+ 13
- 0
bin/tests/modules.slime 查看文件

@@ -0,0 +1,13 @@
;; (define-module math
;; :exports
;; (pi tau pow sqrt)

;; (define pi 3.1415)
;; (define tau (* 2 pi))
;; (define (pow a b) (** a b))
;; (define (sqrt a) (** a 0.5)))

;; (assert (= math::pi 3.1415))
;; (assert (= math::tau (* 2 math::tau)))

(1 2 3)

+ 1
- 4
src/eval.cpp 查看文件

@@ -18,9 +18,6 @@ namespace Slime {
// - setting the parent environment
// - setting the arg_spec
// - potentially evaluating the arguments
if (arg_count == 0) {
return new_env;
}

// NOTE(Felix): Even though we will return the environment at the
// end, for defining symbols here for the parameters, it has to be
@@ -691,7 +688,7 @@ namespace Slime {
for (auto am : ams) {
printf("%d\n ", am);
}
pause();
// pause();
};

proc push_pc_on_cs = [&] {


+ 1
- 1
src/memory.cpp 查看文件

@@ -500,7 +500,7 @@ namespace Slime::Memory {
};

try load_built_ins_into_environment();
// try built_in_load(Memory::create_string("pre.slime"));
try built_in_load(Memory::create_string("pre.slime"));
return ret;
}



+ 13
- 10
src/testing.cpp 查看文件

@@ -620,17 +620,20 @@ namespace Slime {
// pop_environment();
printf("\n-- Test Files --\n");

invoke_test_script("evaluation_of_default_args");
invoke_test_script("alists");
invoke_test_script("case_and_cond");
invoke_test_script("lexical_scope");
// invoke_test_script("evaluation_of_default_args");
// invoke_test_script("case_and_cond");
// invoke_test_script("lexical_scope");
// invoke_test_script("singular_imports");
// invoke_test_script("hashmaps");
// invoke_test_script("import_and_load");
// invoke_test_script("macro_expand");
// invoke_test_script("sicp");
invoke_test_script("modules");


invoke_test_script("class_macro");
invoke_test_script("import_and_load");
invoke_test_script("macro_expand");
invoke_test_script("automata");
invoke_test_script("sicp");
invoke_test_script("hashmaps");
invoke_test_script("singular_imports");
// invoke_test_script("automata");
// invoke_test_script("alists");

return result;
}


正在加载...
取消
保存