Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
scripts.templateloader_test.TemplateLoaderTestCase Class Reference
Inheritance diagram for scripts.templateloader_test.TemplateLoaderTestCase:

Public Member Functions

def test_freevar (self)
 
def test_comments (self)
 
def test_ite1 (self)
 
def test_ite2 (self)
 
def test_if1 (self)
 
def test_if2 (self)
 
def test_else1 (self)
 
def test_else2 (self)
 
def test_eof1 (self)
 
def test_eof2 (self)
 

Detailed Description

Definition at line 11 of file templateloader_test.py.

Member Function Documentation

◆ test_comments()

def scripts.templateloader_test.TemplateLoaderTestCase.test_comments (   self)

Definition at line 45 of file templateloader_test.py.

45 def test_comments(self):
46 input_text = '''//$ comment 1
47Hello
48//$ comment 2'''
49 self._preprocess_test(input_text, {}, 'Hello\n')
50

◆ test_else1()

def scripts.templateloader_test.TemplateLoaderTestCase.test_else1 (   self)

Definition at line 98 of file templateloader_test.py.

98 def test_else1(self):
99 input_text = '''
100 $else
101 '''
102 self._preprocess_error_test(input_text, {}, '$else without $if')
103

◆ test_else2()

def scripts.templateloader_test.TemplateLoaderTestCase.test_else2 (   self)

Definition at line 104 of file templateloader_test.py.

104 def test_else2(self):
105 input_text = '''
106 $if A
107 $else
108 $else
109 '''
110 self._preprocess_error_test(input_text, {'A': True}, 'Double $else')
111

◆ test_eof1()

def scripts.templateloader_test.TemplateLoaderTestCase.test_eof1 (   self)

Definition at line 112 of file templateloader_test.py.

112 def test_eof1(self):
113 input_text = '''
114 $if A
115 '''
116 self._preprocess_error_test(input_text, {'A': True}, 'Unterminated')
117

◆ test_eof2()

def scripts.templateloader_test.TemplateLoaderTestCase.test_eof2 (   self)

Definition at line 118 of file templateloader_test.py.

118 def test_eof2(self):
119 input_text = '''
120 $if A
121 $else
122 '''
123 self._preprocess_error_test(input_text, {'A': True}, 'Unterminated')
124
125

◆ test_freevar()

def scripts.templateloader_test.TemplateLoaderTestCase.test_freevar (   self)

Definition at line 40 of file templateloader_test.py.

40 def test_freevar(self):
41 input_text = '''$A
42$B'''
43 self._preprocess_test(input_text, {}, input_text)
44

◆ test_if1()

def scripts.templateloader_test.TemplateLoaderTestCase.test_if1 (   self)

Definition at line 85 of file templateloader_test.py.

85 def test_if1(self):
86 input_text = '''
87 $if
88 '''
89 self._preprocess_error_test(input_text, {},
90 '$if does not have single variable')
91

◆ test_if2()

def scripts.templateloader_test.TemplateLoaderTestCase.test_if2 (   self)

Definition at line 92 of file templateloader_test.py.

92 def test_if2(self):
93 input_text = '''
94 $if A
95 '''
96 self._preprocess_error_test(input_text, {}, 'Unknown $if variable')
97

◆ test_ite1()

def scripts.templateloader_test.TemplateLoaderTestCase.test_ite1 (   self)

Definition at line 51 of file templateloader_test.py.

51 def test_ite1(self):
52 input_text = '''
53 aaa
54 $if A
55 bbb
56 $else
57 ccc
58 $endif
59 ddd
60 '''
61 self._preprocess_test(
62 input_text, {'A': True}, '''
63 aaa
64 bbb
65 ddd
66 ''')
67

◆ test_ite2()

def scripts.templateloader_test.TemplateLoaderTestCase.test_ite2 (   self)

Definition at line 68 of file templateloader_test.py.

68 def test_ite2(self):
69 input_text = '''
70 aaa
71 $if A
72 bbb
73 $else
74 ccc
75 $endif
76 ddd
77 '''
78 self._preprocess_test(
79 input_text, {'A': False}, '''
80 aaa
81 ccc
82 ddd
83 ''')
84

The documentation for this class was generated from the following file: