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

Public Member Functions

def setUp (self)
 
def tearDown (self)
 
def check (self, m, expected)
 
def testExample (self)
 

Detailed Description

Definition at line 13 of file multiemitter_test.py.

Member Function Documentation

◆ check()

def scripts.multiemitter_test.MultiEmitterTestCase.check (   self,
  m,
  expected 
)
Verifies that the multiemitter contains the expected contents.

Expected is a list of (filename, content) pairs, sorted by filename.

Definition at line 21 of file multiemitter_test.py.

21 def check(self, m, expected):
22 """Verifies that the multiemitter contains the expected contents.
23
24 Expected is a list of (filename, content) pairs, sorted by filename.
25 """
26 files = []
27
28 def _Collect(file, contents):
29 files.append((file, ''.join(contents)))
30
31 m.Flush(_Collect)
32 self.assertEqual(expected, files)
33
#define check(reporter, ref, unref, make, kill)
Definition: RefCntTest.cpp:85
static SkString join(const CommandLineFlags::StringArray &)
Definition: skpbench.cpp:741

◆ setUp()

def scripts.multiemitter_test.MultiEmitterTestCase.setUp (   self)

Definition at line 15 of file multiemitter_test.py.

15 def setUp(self):
16 pass
17

◆ tearDown()

def scripts.multiemitter_test.MultiEmitterTestCase.tearDown (   self)

Definition at line 18 of file multiemitter_test.py.

18 def tearDown(self):
19 pass
20

◆ testExample()

def scripts.multiemitter_test.MultiEmitterTestCase.testExample (   self)

Definition at line 34 of file multiemitter_test.py.

34 def testExample(self):
35 m = multiemitter.MultiEmitter()
36 e1 = m.FileEmitter('file1')
37 e2 = m.FileEmitter('file2', 'key2')
38 e1.Emit('Hi 1')
39 e2.Emit('Hi 2')
40 m.Find('key2').Emit('Bye 2')
41 self.check(m, [('file1', 'Hi 1'), ('file2', 'Hi 2Bye 2')])
42
43

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