Simplify allocation-recording in test suite using new ts_set_allocator API

This commit is contained in:
Max Brunsfeld 2021-12-30 16:09:07 -08:00
parent e01ea9ff51
commit 622359b400
19 changed files with 245 additions and 254 deletions

View file

@ -1,4 +1,5 @@
use super::helpers::{
allocations,
edits::{get_random_edit, invert_edit},
fixtures::{fixtures_dir, get_language, get_test_language},
random::Rand,
@ -11,8 +12,8 @@ use crate::{
test::{parse_tests, print_diff, print_diff_key, strip_sexp_fields, TestEntry},
util,
};
use std::{fs, usize};
use tree_sitter::{allocations, LogType, Node, Parser, Tree};
use std::fs;
use tree_sitter::{LogType, Node, Parser, Tree};
const EDIT_COUNT: usize = 3;
const TRIAL_COUNT: usize = 10;