Files
praxisandClaude Fable 5.2 7f2139d8d0 Offline test fixtures
883 files, from working commit b1a079a.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-19 01:32:48 +02:00

29 lines
2.0 KiB
Lua

-- Synthetic only: exercise the actual extracted controller function.
local path=assert(arg[1]); local mode=arg[2] or "proposed"
local flags={};local class="WARRIOR";local page,bonus,written=1,7,nil
InputUtil={IsMKBUIEnabled=function() return true end}
PossessActionBar={Update=function() end};StanceBar={Update=function() end}
OverrideActionBar={UpdateSkin=function() end};MainActionBar={SetAttribute=function(_,key,v) assert(key=="actionpage");written=v end}
ActionBarButtonEventsFrame={frames={}};LE_ACTIONBAR_STATE_MAIN=1;LE_ACTIONBAR_STATE_OVERRIDE=2
ValidateActionBarTransition=function() end;UnitVehicleSkin=function() return "" end
UnitClass=function() return class,class end
C_ActionBar={HasBonusActionBar=function()return flags.bonus or false end,HasOverrideActionBar=function()return flags.override or false end,HasVehicleActionBar=function()return flags.vehicle or false end,HasTempShapeshiftActionBar=function()return flags.temp or false end,GetOverrideBarSkin=function()return 0 end,GetActionBarPage=function()return page end,GetBonusBarIndex=function()return bonus end,GetVehicleBarIndex=function()return 10 end,GetOverrideBarIndex=function()return 11 end,GetTempShapeshiftBarIndex=function()return 12 end}
C_PetBattles={IsInBattle=function()return false end}
assert(loadfile(path))();ValidateActionBarTransition=function() end;local count=0
local function check(c,p,b,f,expected)
class,page,bonus,flags,written=c,p,b,f,nil;ActionBarController_UpdateAll(false)
assert(written==expected,c.." page mismatch: "..tostring(written).." vs "..expected);count=count+1
end
for _,b in ipairs({7,8,9})do
check("WARRIOR",1,b,{bonus=true},mode=="original" and b or 1)
check("DRUID",1,b,{bonus=true},b)
check("WARRIOR",2,b,{bonus=true},2)
end
for _,c in ipairs({"WARRIOR","DRUID","PALADIN"})do
check(c,1,7,{vehicle=true,bonus=true},10)
check(c,1,7,{override=true,bonus=true},11)
check(c,1,7,{temp=true,bonus=true},12)
check(c,1,7,{},1)
end
print("Original controller branch policy: "..count.." cases PASS ("..mode..")")