Oswald D. Kothgassner

21 papers C 5Journal 15Unranked 1
YearRankTypeTitle / Venue / Authors
2025 J jnl
Virtual Real.
Anna Felnhofer, Katharina Goinska, Johann Hattinger, Adrian Kamper, Andreas Lenz, Helmut Hlavacs, Oswald D. Kothgassner
2024 J jnl
Int. J. Hum. Comput. Interact.
Anna Felnhofer, Thiemo Knaust, Lisa Weiss, Katharina Goinska, Anna Mayer, Oswald D. Kothgassner
2022 J jnl
Virtual Real.
Thiemo Knaust, Anna Felnhofer, Oswald D. Kothgassner, Helge Höllmer, Robert-Jacek Gorzka, Holger Schulz
2020 C conf
ICEC
Andreas Lenz, Helmut Hlavacs, Oswald D. Kothgassner, Anna Felnhofer
2019 J jnl
IEEE Access
Burkhard Hoppenstedt, Thomas Probst, Manfred Reichert, Winfried Schlee, Klaus Kammerer, Myra Spiliopoulou, Johannes Schobel, Michael Winter, Anna Felnhofer, Oswald D. Kothgassner, Rüdiger Pryss
2019 J jnl
Cyberpsychology Behav. Soc. Netw.
Anna Felnhofer, Helmut Hlavacs, Leon Beutl, Ilse Kryspin-Exner, Oswald D. Kothgassner
2019 J jnl
Int. J. Hum. Comput. Stud.
Anna Felnhofer, Marlene Kaufmann, Katharina Atteneder, Johanna Xenia Kafka, Helmut Hlavacs, Leon Beutl, Kristina Hennig-Fast, Oswald D. Kothgassner
2018 J jnl
Cyberpsychology Behav. Soc. Netw.
Oswald D. Kothgassner, Andreas Goreis, Johanna Xenia Kafka, Helmut Hlavacs, Leon Beutl, Ilse Kryspin-Exner, Anna Felnhofer
2018 J jnl
Comput. Hum. Behav.
Anna Felnhofer, Johanna Xenia Kafka, Helmut Hlavacs, Leon Beutl, Ilse Kryspin-Exner, Oswald D. Kothgassner
2018 conf
SIGGRAPH Posters
Katharina Krösl, Anna Felnhofer, Johanna Xenia Kafka, Laura Schuster, Alexandra Rinnerthaler, Michael Wimmer, Oswald D. Kothgassner
2017 J jnl
Comput. Hum. Behav.
Oswald D. Kothgassner, Mirjam Griesinger, Kathrin Kettner, Katja Wayan, Sabine Völkl-Kernstock, Helmut Hlavacs, Leon Beutl, Anna Felnhofer
2016 J jnl
Comput. Hum. Behav.
Oswald D. Kothgassner, Anna Felnhofer, Helmut Hlavacs, Leon Beutl, Rupert Palme, Ilse Kryspin-Exner, Lisa Maria Glenk
2016 C conf
ICEC
Oswald D. Kothgassner, Helmut Hlavacs, Leon Beutl, Lisa Maria Glenk, Rupert Palme, Anna Felnhofer
2015 J jnl
Int. J. Hum. Comput. Stud.
Anna Felnhofer, Oswald D. Kothgassner, Mareike Schmidt, Anna-Katharina Heinzle, Leon Beutl, Helmut Hlavacs, Ilse Kryspin-Exner
2014 J jnl
Cyberpsychology Behav. Soc. Netw.
Anna Felnhofer, Oswald D. Kothgassner, Thomas Hetterle, Leon Beutl, Helmut Hlavacs, Ilse Kryspin-Exner
2014 J jnl
Comput. Hum. Behav.
Anna Felnhofer, Oswald D. Kothgassner, Nathalie Hauk, Leon Beutl, Helmut Hlavacs, Ilse Kryspin-Exner
2013 J jnl
Comput. Educ.
Mario Lehenbauer, Oswald D. Kothgassner, Ilse Kryspin-Exner, Birgit U. Stetina
2013 C conf
ICEC
Oswald D. Kothgassner, Anna Felnhofer, Helmut Hlavacs, Leon Beutl, Jasmine Gomm, Nathalie Hauk, Elisabeth Kastenhofer, Ilse Kryspin-Exner
2013 C conf
Advances in Computer Entertainment
Mareike Schmidt, Johanna Xenia Kafka, Oswald D. Kothgassner, Helmut Hlavacs, Leon Beutl, Anna Felnhofer
2012 C conf
ICEC
Oswald D. Kothgassner, Anna Felnhofer, Leon Beutl, Helmut Hlavacs, Mario Lehenbauer, Birgit U. Stetina
2011 J jnl
Comput. Hum. Behav.
Birgit U. Stetina, Oswald D. Kothgassner, Mario Lehenbauer, Ilse Kryspin-Exner
tests/unit/test_decompile_function_type.py
← Index tests/unit/test_decompile_function_type.py python
"""Unit tests for bninja/function_type.py."""
import sys
import pytest
from unittest.mock import MagicMock

# Install binaryninja stubs before importing
from tests.unit.conftest_binja_stubs import install_binja_stubs, SymbolType
install_binja_stubs()

from redb.extractors.decompiler.bninja.function_type import (
    FunctionType,
    FunctionTypeAnalysis,
)


# ============================================================================
# 4a. FunctionType / FunctionTypeAnalysis
# ============================================================================


class TestFunctionTypeEnum:
    def test_function_type_enum_values(self):
        assert FunctionType.USER.value == "USER"
        assert FunctionType.LIBRARY.value == "LIBRARY"
        assert FunctionType.EXTERNAL.value == "EXTERNAL"
        assert FunctionType.THUNK.value == "THUNK"
        assert FunctionType.UNKNOWN.value == "UNKNOWN"


class TestFunctionTypeAnalysis:
    def _make_function(self, symbol_type=None, is_thunk=False, raise_on_symbol=False):
        func = MagicMock()
        func.is_thunk = is_thunk
        if raise_on_symbol:
            type(func).symbol = property(lambda self: (_ for _ in ()).throw(Exception("no symbol")))
        else:
            func.symbol.type = symbol_type if symbol_type is not None else SymbolType.FunctionSymbol
        return func

    def test_user_function_type(self):
        func = self._make_function(symbol_type=SymbolType.FunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.USER

    def test_external_function_type(self):
        func = self._make_function(symbol_type=SymbolType.ImportedFunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.EXTERNAL

    def test_library_function_type(self):
        func = self._make_function(symbol_type=SymbolType.LibraryFunctionSymbol)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.LIBRARY

    def test_thunk_function_type(self):
        # Thunk overrides the symbol type
        func = self._make_function(
            symbol_type=SymbolType.FunctionSymbol, is_thunk=True
        )
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.THUNK

    def test_exception_returns_unknown(self):
        func = self._make_function(raise_on_symbol=True)
        analysis = FunctionTypeAnalysis(func)
        assert analysis.get_function_type() == FunctionType.UNKNOWN