Carol S. Saunders

40 papers C 12Journal 20Unranked 7
YearRankTypeTitle / Venue / Authors
2024 J jnl
IEEE Trans. Engineering Management
Jacob Chia-An Tsai, Gary Klein, Carol S. Saunders, James J. Jiang
2016 J jnl
Decis. Support Syst.
Yu Andy Wu, Carol S. Saunders
2016 J jnl
MIS Q. Executive
Benoit A. Aubert, Carol S. Saunders, Martin Wiener, Reinhard Denk, Tobias Wolfermann
2015 J jnl
J. Assoc. Inf. Syst.
Suprateek Sarker, Ritu Agarwal, Paulo B. Góes, Shirley Gregor, Ola Henfridsson, Carol S. Saunders, Bernard C. Y. Tan
2015 C conf
ICIS
Ulrich Remus, Martin Wiener, Magnus Mähring, Carol S. Saunders, W. Alec Cram
2014 conf
AMCIS
Douglas R. Vogel, Rolf T. Wigand, Carol S. Saunders, Ephraim R. McLean, Robert P. Bostrom
2014 ch.
Information Systems Outsourcing
Martin Wiener, Carol S. Saunders
2013 C conf
ICIS
Anne-Françoise Rutkowski, Carol S. Saunders, Martin Wiener, R. J. A. M. Smeulders
2013 C conf
ICIS
Hanna Krasnova, Natasha F. Veltri, Tyge-F. Kummer, Kerstin Schäfer, Carol S. Saunders
2012 J jnl
J. Assoc. Inf. Syst.
Rudy Hirschheim, Carol S. Saunders, Detmar W. Straub
2012 conf
HICSS
Jon R. Pluyter, Anne-Françoise Rutkowski, Jack J. Jakimowicz, Carol S. Saunders
2012 J jnl
MIS Q.
George A. Marcoulides, Wynne W. Chin, Carol S. Saunders
2011 J jnl
Inf. Resour. Manag. J.
Yu Andy Wu, Carol S. Saunders
2011 J jnl
MIS Q.
Carol S. Saunders, Anne-Françoise Rutkowski, Michiel van Genuchten, Doug Vogel, Julio Molina Orrego
2010 J jnl
Computer
Anne-Françoise Rutkowski, Carol S. Saunders
2010 J jnl
Commun. Assoc. Inf. Syst.
John Leslie King, Michael David Myers, Suzanne Rivard, Carol S. Saunders, Ron Weber
2009 J jnl
Computer
Doug Vogel, Michiel van Genuchten, Carol S. Saunders
2009 J jnl
InnovaInt. J. Actor Netw. Theory Technol. Innov.
Lars Linden, Carol S. Saunders
2009 conf
ECIS
Fred Niederman, Kalle Lyytinen, Carol S. Saunders, Ellen Christiaanse, Richard L. Baskerville
2009 conf
ECIS
Carol S. Saunders, Carol V. Brown, Janice C. Sipior, Ping Zhang, Ilze Zigurs, Claudia Loebbecke
2009 C conf
ICIS
John L. King, Michael D. Myers, Suzanne Rivard, Carol S. Saunders, Ron Weber
2008 J jnl
Int. J. Electron. Bus.
Carol S. Saunders, Madelyn Flammia
2008 C conf
ICIS
Shirley Gregor, Varun Grover, Kalle Lyytinen, Carol S. Saunders, Fred Niederman
2007 J jnl
J. Assoc. Inf. Sci. Technol.
Madelyn Flammia, Carol S. Saunders
2006 J jnl
J. Assoc. Inf. Syst.
Stephen A. Sivo, Carol S. Saunders, Qing Chang, James J. Jiang
2006 conf
AMCIS
Yu Andy Wu, Yuzhu Li, Carol S. Saunders
2005 J jnl
Data Base
Wafa Elgarah, Natalia Falaleeva, Carol S. Saunders, Virginia Ilie, J. T. Shim, James F. Courtney
2005 conf
AMCIS
Yu Andy Wu, Carol S. Saunders
2005 C conf
ICIS
Paul Gray, Kalle Lyytinen, Carol S. Saunders, Leslie P. Willcocks, Vladimir Zwass
2005 C conf
ICIS
Ananth Srinivasan, Salvatore T. March, Carol S. Saunders
2004 J jnl
Commun. ACM
Albert B. Schwarzkopf, Roberto J. Mejias, Jon Jasperson, Carol S. Saunders, Hermann Gruenwald
2004 C conf
ICEC
Carol S. Saunders, Yu Andy Wu, Yuzhu Li, Shawn Weisfeld
2003 J jnl
Inf. Syst. Res.
Shaila M. Miranda, Carol S. Saunders
2002 J jnl
MIS Q.
Jon Jasperson, Traci A. Carte, Carol S. Saunders, Brian S. Butler, Henry Croes, Weijun Zheng
2001 C conf
ICIS
Carol S. Saunders, Steven D. Anderson, Sue A. Conger
2000 C conf
ICIS
Carol S. Saunders, Traci A. Carte, Jon Jasperson, Henry Croes, Weijun Zheng, Brian S. Butler
1998 C conf
ICIS
Brian S. Butler, Michael J. Ginzberg, David Knights, Carol S. Saunders
1998 conf
SIGCPR
Stuart Diaz Galup, Carol S. Saunders, Robert Cerveny
1996 C conf
ICIS
Keri E. Pearlson, Dan Accrocco, Jim V. McGee, Carol S. Saunders
1986 J jnl
Commun. ACM
Carol S. Saunders, Richard W. Scamell
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