Exemplo n.º 1
0
 def test_pokeMemoryMap(self):
     info = SimInfoAPI()
     x = bytearray(VERSION_STRING, 'utf-8')
     for i, ch in enumerate(x):
         info.Rf2Ext.mVersion[i] = ch
     #info.Rf2Ext.mVersion = str_to_byte_array(VERSION_STRING)
     __ = VERSION_STRING.encode()
     info.Rf2Ext.is64bit = 1
     print(info.isSharedMemoryAvailable())
     assert info.isSharedMemoryAvailable() is not None
Exemplo n.º 2
0
 def test_track_name(self):
     info = SimInfoAPI()
     x = bytearray(TRACK_NAME, 'utf-8')
     for i, ch in enumerate(x):
         info.Rf2Scor.mScoringInfo.mTrackName[i] = ch
     trackName = Cbytestring2Python(info.Rf2Scor.mScoringInfo.mTrackName)
     assert trackName
Exemplo n.º 3
0
 def test_is_on_track(self):
     info = SimInfoAPI()
     info.Rf2Ext.mInRealtimeFC = 1
     assert info.isOnTrack()
Exemplo n.º 4
0
 def test_is_track_loaded(self):
     info = SimInfoAPI()
     info.Rf2Ext.mSessionStarted = 1
     assert info.isTrackLoaded()