Tests moved into separate folders (#3794)

Fix android crash on application exit
This commit is contained in:
Hristo Hristov
2017-03-15 12:26:54 +02:00
committed by GitHub
parent 58ab01870d
commit 7b5ef052fd
50 changed files with 258 additions and 120 deletions

View File

@@ -0,0 +1,36 @@
// >> trace-require
import * as trace from "tns-core-modules/trace";
// << trace-require
export var test_DummyTestForSnippetOnly0 = function () {
// >> trace-all-categories
trace.setCategories(trace.categories.All);
trace.enable();
// << trace-all-categories
}
export var test_DummyTestForSnippetOnly1 = function () {
// >> trace-specific-categories
trace.setCategories(trace.categories.concat(
trace.categories.Binding
, trace.categories.Debug
, trace.categories.Layout
, trace.categories.NativeLifecycle
, trace.categories.Navigation
, trace.categories.Style
, trace.categories.ViewHierarchy
, trace.categories.VisualTreeEvents
));
trace.enable();
// << trace-specific-categories
}
export var test_DummyTestForSnippetOnly2 = function () {
// >> trace-message
trace.setCategories(trace.categories.Debug);
trace.enable();
if (trace.isEnabled()) {
trace.write("My Debug Message", trace.categories.Debug);
}
// << trace-message
}

19
tests/app/trace/trace.md Normal file
View File

@@ -0,0 +1,19 @@
---
nav-title: "trace How-To"
title: "trace"
environment: nativescript
description: "Examples for using trace"
previous_url: /ApiReference/trace/HOW-TO
---
# Trace
Tracing information about your app requires the "trace" module.
{%snippet trace-require%}
### Tracing all categories of events.
{%snippet trace-all-categories%}
### Tracing specific categories of events.
{%snippet trace-specific-categories%}
### Write your own trace message.
{%snippet trace-message%}