浏览代码

Correct naming in tests

gingerBill 3 年之前
父节点
当前提交
ae9d540c1c

+ 1 - 1
core/encoding/entity/example/entity_example.odin

@@ -8,7 +8,7 @@ import "core:time"
 
 doc_print :: proc(doc: ^xml.Document) {
 	buf: strings.Builder
-	defer strings.destroy_builder(&buf)
+	defer strings.builder_destroy(&buf)
 	w := strings.to_writer(&buf)
 
 	xml.print(w, doc)

+ 1 - 1
core/encoding/xml/example/xml_example.odin

@@ -84,7 +84,7 @@ example :: proc() {
 
 doc_hash :: proc(doc: ^xml.Document, print := false) -> (crc32: u32) {
 	buf: strings.Builder
-	defer strings.destroy_builder(&buf)
+	defer strings.builder_destroy(&buf)
 	w := strings.to_writer(&buf)
 
 	xml.print(w, doc)

+ 1 - 1
core/unicode/tools/generate_entity_table.odin

@@ -45,7 +45,7 @@ generate_encoding_entity_table :: proc() {
 	printf("\"%v\" loaded and parsed.\n", filename)
 
 	generated_buf: strings.Builder
-	defer strings.destroy_builder(&generated_buf)
+	defer strings.builder_destroy(&generated_buf)
 	w := strings.to_writer(&generated_buf)
 
 	charlist, charlist_ok := xml.find_child_by_ident(doc.root, "charlist")

+ 3 - 3
tests/core/encoding/varint/test_core_varint.odin

@@ -79,8 +79,8 @@ test_leb128 :: proc(t: ^testing.T) {
 		}
 	}
 
-	for num_bytes in 1..uint(16) {
-		for _ in 0..RANDOM_TESTS {
+	for num_bytes in 1..=uint(16) {
+		for _ in 0..=RANDOM_TESTS {
 			unsigned, signed := get_random(num_bytes)
 
 			{
@@ -109,7 +109,7 @@ test_leb128 :: proc(t: ^testing.T) {
 get_random :: proc(byte_count: uint) -> (u: u128, i: i128) {
 	assert(byte_count >= 0 && byte_count <= size_of(u128))
 
-	for _ in 1..byte_count {
+	for _ in 1..=byte_count {
 		u <<= 8
 		u |= u128(rand.uint32() & 0xff)
 	}

+ 1 - 1
tests/core/encoding/xml/test_core_xml.odin

@@ -281,7 +281,7 @@ doc_to_string :: proc(doc: ^xml.Document) -> (result: string) {
 	}
 
 	buf: strings.Builder
-	defer strings.destroy_builder(&buf)
+	defer strings.builder_destroy(&buf)
 
 	print(strings.to_writer(&buf), doc)
 	return strings.clone(strings.to_string(buf))