Kaynağa Gözat

generate code coverage reports

master
Martin Dørum 4 yıl önce
ebeveyn
işleme
56008fc9f4

+ 3
- 1
test/build.bx Dosyayı Görüntüle

includes := snow ../include/lang2 includes := snow ../include/lang2
defines := SNOW_ENABLED defines := SNOW_ENABLED
sanitizers := address undefined sanitizers := address undefined
cflags := -g
cflags := -g -fprofile-arcs -ftest-coverage
ldflags := --coverage
ldlibs := gcov

+ 2
- 0
test/examples/arrays.l2 Dosyayı Görüntüle



arr.1 = "nope" arr.1 = "nope"
print arr print arr

print []

+ 1
- 0
test/examples/arrays.l2.expected Dosyayı Görüntüle

[10 20 30] [10 20 30]
30 30
[10 nope 30] [10 nope 30]
[]

+ 2
- 0
test/examples/functions.l2 Dosyayı Görüntüle

{retval} {retval}
} }
print func()() print func()()

print {0}

+ 1
- 0
test/examples/functions.l2.expected Dosyayı Görüntüle

Hello World Hello World
10 10
what's up what's up
(function)

+ 2
- 0
test/examples/namespaces.l2 Dosyayı Görüntüle



obj.bar = {baz: "how's your day going?"} obj.bar = {baz: "how's your day going?"}
print obj.bar.baz print obj.bar.baz

print {}

+ 1
- 0
test/examples/namespaces.l2.expected Dosyayı Görüntüle

hello world hello world
100 100
how's your day going? how's your day going?
(namespace)

+ 12
- 0
test/generate-coverage.sh Dosyayı Görüntüle

#!/bin/sh
set -ex

box --run -q
mkdir -p coverage
gcov $(find bx-out -type f -name '*.o')
mv *.gcov coverage
cp $(find bx-out -type f -name '*.gcda' -or -name '*.gcno') coverage

cd coverage
lcov --capture --directory . --output-file coverage.info
genhtml coverage.info --output-directory report

+ 1
- 0
test/src/examples.t.c Dosyayı Görüntüle

vm.std_output = &output.w; vm.std_output = &output.w;


l2_vm_run(&vm); l2_vm_run(&vm);
l2_vm_gc(&vm);


l2_vm_free(&vm); l2_vm_free(&vm);
free(bytecode.mem); free(bytecode.mem);

Loading…
İptal
Kaydet