From ffa6efa7f55e88be72812c47e4286fda48ab94f0 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 9 Mar 2023 19:58:04 -0500 Subject: feat(julia): add tests for new changes --- tests/query/highlights/julia/test.jl | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tests/query/highlights/julia/test.jl (limited to 'tests/query/highlights/julia') diff --git a/tests/query/highlights/julia/test.jl b/tests/query/highlights/julia/test.jl new file mode 100644 index 000000000..46fc313c0 --- /dev/null +++ b/tests/query/highlights/julia/test.jl @@ -0,0 +1,26 @@ +function load_data(::Symbol; ::Int) :: Tuple +# <- keyword.function +# ^ function +# ^ punctuation.bracket +# ^^ punctuation.delimiter +# ^ type.builtin +# ^ punctuation.delimiter +# ^^ punctuation.delimiter +# ^^^ type.builtin +# ^ punctuation.bracket +# ^^ punctuation.delimiter +# ^ type.builtin + dataset = CIFAR10(; Tx = Float32, split = split) +# ^^^^^^^ variable +# ^ operator +# ^ function.call +# ^ operator +# ^ type.builtin + X = reshape(dataset.features[:, :, :, begin:n_obs], :, n_obs) # flattening the image pixels +# ^^^^^ variable.builtin + y = categorical2onehot(dataset.targets[begin:n_obs], N_LABELS) +# ^^^^^ variable.builtin + return X, y +# ^^^^^^ keyword.return +end +# <- keyword.function -- cgit v1.2.3-70-g09d2