port
This commit is contained in:
parent
62f5936669
commit
7aa9f31ee8
@ -61,4 +61,13 @@ languages = [
|
|||||||
image="mono",
|
image="mono",
|
||||||
highlight="csharp",
|
highlight="csharp",
|
||||||
),
|
),
|
||||||
|
Language(
|
||||||
|
id=5,
|
||||||
|
name="Swift",
|
||||||
|
work_name="Swift",
|
||||||
|
file_type="swift",
|
||||||
|
logo_url="https://cdn.worldvectorlogo.com/logos/swift-15.svg",
|
||||||
|
image="swift",
|
||||||
|
highlight="swift",
|
||||||
|
),
|
||||||
]
|
]
|
||||||
|
21
SprintLib/testers/SwiftTester.py
Normal file
21
SprintLib/testers/SwiftTester.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
from os import listdir
|
||||||
|
|
||||||
|
from SprintLib.testers.BaseTester import BaseTester, TestException
|
||||||
|
|
||||||
|
|
||||||
|
class SwiftTester(BaseTester):
|
||||||
|
def before_test(self):
|
||||||
|
files = [
|
||||||
|
file
|
||||||
|
for file in listdir(self.solution.testing_directory)
|
||||||
|
if file.endswith(".swift")
|
||||||
|
]
|
||||||
|
code = self.solution.exec_command(
|
||||||
|
f'swiftc {" ".join(files)} -o solution'
|
||||||
|
)
|
||||||
|
if code != 0:
|
||||||
|
raise TestException("CE")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def command(self):
|
||||||
|
return "./solution"
|
Loading…
Reference in New Issue
Block a user