예제 #1
0
def empty_context(input_file, fragment_dir, package_manager):
    return Context(base_dir=input_file.parent,
                   fragment_dir=fragment_dir,
                   reference=ApiReference(),
                   package_manager=package_manager,
                   current_document=DocumentTreeNode(input_file),
                   current_package=Package(PackageManager.INPUT_FILES))
예제 #2
0
def empty_context(input_file, build_dir, fragment_dir):
    return Context(base_dir=input_file.parent,
                   build_dir=build_dir,
                   fragment_dir=fragment_dir,
                   reference=ApiReference(),
                   current_document=DocumentTreeNode(input_file))
예제 #3
0
def test_transcode__not_supported():
    compound = make_compound(language="java", name="Coordinate")
    with pytest.raises(TranscoderError):
        TranscoderBase.transcode(compound, "cpp", ApiReference())
예제 #4
0
def test_transcode__compound():
    compound = make_compound(language="java", name="Coordinate")
    transcoded = TranscoderBase.transcode(compound, "kotlin", ApiReference())
    assert transcoded.language == "kotlin"
예제 #5
0
def test_transcode__load_and_detect_transcoders():
    instance = TranscoderBase.instance("java", "kotlin", ApiReference())
    assert instance is not None
    assert isinstance(instance, KotlinTranscoder)
예제 #6
0
def transcoder():
    return _TestTranscoder(ApiReference())
def transcoder():
    return SwiftTranscoder(ApiReference())