Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
gn_test.GNTestCase Class Reference
Inheritance diagram for gn_test.GNTestCase:

Public Member Functions

def test_get_out_dir (self)
 
def test_to_gn_args (self)
 
def test_cannot_use_android_and_enable_unittests (self)
 
def test_cannot_use_ios_and_enable_unittests (self)
 
def test_parse_size (self)
 

Detailed Description

Definition at line 13 of file gn_test.py.

Member Function Documentation

◆ test_cannot_use_android_and_enable_unittests()

def gn_test.GNTestCase.test_cannot_use_android_and_enable_unittests (   self)

Definition at line 44 of file gn_test.py.

44 def test_cannot_use_android_and_enable_unittests(self):
45 with self.assertRaises(Exception):
46 self._gn_args(['--android', '--enable-unittests'])
47

◆ test_cannot_use_ios_and_enable_unittests()

def gn_test.GNTestCase.test_cannot_use_ios_and_enable_unittests (   self)

Definition at line 48 of file gn_test.py.

48 def test_cannot_use_ios_and_enable_unittests(self):
49 with self.assertRaises(Exception):
50 self._gn_args(['--ios', '--enable-unittests'])
51

◆ test_get_out_dir()

def gn_test.GNTestCase.test_get_out_dir (   self)

Definition at line 19 of file gn_test.py.

19 def test_get_out_dir(self):
20 self._expect_build_dir(['--runtime-mode', 'debug'], os.path.join('out', 'host_debug'))
21 self._expect_build_dir(['--runtime-mode', 'release'], os.path.join('out', 'host_release'))
22 self._expect_build_dir(['--ios'], os.path.join('out', 'ios_debug'))
23 self._expect_build_dir(['--ios', '--darwin-extension-safe'],
24 os.path.join('out', 'ios_debug_extension_safe'))
25 self._expect_build_dir(['--ios', '--runtime-mode', 'release'],
26 os.path.join('out', 'ios_release'))
27 self._expect_build_dir(['--ios', '--darwin-extension-safe', '--runtime-mode', 'release'],
28 os.path.join('out', 'ios_release_extension_safe'))
29 self._expect_build_dir(['--android'], os.path.join('out', 'android_debug'))
30 self._expect_build_dir(['--android', '--runtime-mode', 'release'],
31 os.path.join('out', 'android_release'))
32

◆ test_parse_size()

def gn_test.GNTestCase.test_parse_size (   self)

Definition at line 52 of file gn_test.py.

52 def test_parse_size(self):
53 self.assertEqual(gn.parse_size('5B'), 5)
54 self.assertEqual(gn.parse_size('5KB'), 5 * 2**10)
55 self.assertEqual(gn.parse_size('5MB'), 5 * 2**20)
56 self.assertEqual(gn.parse_size('5GB'), 5 * 2**30)
57
58

◆ test_to_gn_args()

def gn_test.GNTestCase.test_to_gn_args (   self)

Definition at line 37 of file gn_test.py.

37 def test_to_gn_args(self):
38 # This would not necessarily be true on a 32-bit machine?
39 self.assertEqual(
40 self._gn_args(['--ios', '--simulator', '--simulator-cpu', 'x64'])['target_cpu'], 'x64'
41 )
42 self.assertEqual(self._gn_args(['--ios'])['target_cpu'], 'arm64')
43

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