summaryrefslogtreecommitdiff
path: root/main/tests
diff options
context:
space:
mode:
Diffstat (limited to 'main/tests')
-rw-r--r--main/tests/test_gdscript.cpp4
-rw-r--r--main/tests/test_shader_lang.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/main/tests/test_gdscript.cpp b/main/tests/test_gdscript.cpp
index b0b7fc8357..55e31a18c3 100644
--- a/main/tests/test_gdscript.cpp
+++ b/main/tests/test_gdscript.cpp
@@ -1041,10 +1041,10 @@ MainLoop *test(TestType p_type) {
} else if (p_type == TEST_BYTECODE) {
- Vector<uint8_t> buf = GDScriptTokenizerBuffer::parse_code_string(code);
+ Vector<uint8_t> buf2 = GDScriptTokenizerBuffer::parse_code_string(code);
String dst = test.get_basename() + ".gdc";
FileAccess *fw = FileAccess::open(dst, FileAccess::WRITE);
- fw->store_buffer(buf.ptr(), buf.size());
+ fw->store_buffer(buf2.ptr(), buf2.size());
memdelete(fw);
}
diff --git a/main/tests/test_shader_lang.cpp b/main/tests/test_shader_lang.cpp
index 8441748cc0..dcb19b7df7 100644
--- a/main/tests/test_shader_lang.cpp
+++ b/main/tests/test_shader_lang.cpp
@@ -149,11 +149,11 @@ static String dump_node_code(SL::Node *p_node, int p_level) {
String header;
header = _typestr(fnode->return_type) + " " + fnode->name + "(";
- for (int i = 0; i < fnode->arguments.size(); i++) {
+ for (int j = 0; j < fnode->arguments.size(); j++) {
- if (i > 0)
+ if (j > 0)
header += ", ";
- header += _prestr(fnode->arguments[i].precision) + _typestr(fnode->arguments[i].type) + " " + fnode->arguments[i].name;
+ header += _prestr(fnode->arguments[j].precision) + _typestr(fnode->arguments[j].type) + " " + fnode->arguments[j].name;
}
header += ")\n";
@@ -336,9 +336,9 @@ MainLoop *test() {
print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text());
return NULL;
} else {
- String code;
- recreate_code(&code, sl.get_shader());
- print_line("code:\n\n" + code);
+ String code2;
+ recreate_code(&code2, sl.get_shader());
+ print_line("code:\n\n" + code2);
}
return NULL;