/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/python/import_share_runme.py
15 строк
543 B
Ben Zwick
Fix test to reproduce cross-module type cast bug
20 фев 2026, 22:35
20 фев 2026, 22:35
d2def07
Код
Авторство
О чём код?
import import_share_a import import_share_c import import_share_b # Test cross-module type cast: DenseMatrix (module B) to Operator (module A) dm = import_share_b.DenseMatrix(100, 200) height = import_share_a.Operator_Height(dm) if height != 100: raise RuntimeError("Expected 100, got " + str(height)) # Test factory function: Make_DenseMatrix (module C) returns Operator* op = import_share_c.Make_DenseMatrix(50, 60) height = import_share_a.Operator_Height(op) if height != 50: raise RuntimeError("Expected 50, got " + str(height))