- Compiler: PP → Lexer → Parser → Analyzer → Gengo pipeline - Parser: 232/236 (98%) Harbour compatibility, registry-based dispatch - RTL: 351 Harbour-compatible functions - RDD: DBF/NTX/CDX engines with Rushmore bitmap optimization - Go Interop: IMPORT + pkg.Func() + obj:Method() with FastPath (15M calls/sec) - HB_FUNC API: Full Harbour C API compatible Go bridge - Concurrency: SPAWN/LAUNCH/GOROUTINE, <-, WATCH, PARALLEL FOR, ASYNC/AWAIT - Extensions: Multi-return, DEFER, Slice, f-string, Nil-safe ?:, CONST - Macro Compiler: Runtime AST parsing and evaluation - Debugger: TUI debugger with source display, breakpoints, stepping - FRB: Native + Pcode dual mode runtime binary - Tests: 13 packages ALL PASS Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
56 lines
1.0 KiB
Go
56 lines
1.0 KiB
Go
package hbrtl
|
|
|
|
import (
|
|
"five/hbrt"
|
|
"testing"
|
|
)
|
|
|
|
func TestSetFunc(t *testing.T) {
|
|
_, th := setupVM()
|
|
|
|
// Get SET EXACT (default false)
|
|
th.PushInt(SetExact)
|
|
th.PendingParams2(1)
|
|
SetFunc(th)
|
|
if th.GetRetValue().AsBool() {
|
|
t.Error("SET EXACT default should be false")
|
|
}
|
|
|
|
// Set SET EXACT ON
|
|
th.PushInt(SetExact)
|
|
th.PushValue(hbrt.MakeBool(true))
|
|
th.PendingParams2(2)
|
|
SetFunc(th)
|
|
// Returns old value (false)
|
|
if th.GetRetValue().AsBool() {
|
|
t.Error("SET(EXACT, .T.) should return old .F.")
|
|
}
|
|
|
|
// Verify new value
|
|
th.PushInt(SetExact)
|
|
th.PendingParams2(1)
|
|
SetFunc(th)
|
|
if !th.GetRetValue().AsBool() {
|
|
t.Error("SET EXACT should now be true")
|
|
}
|
|
|
|
// Restore
|
|
th.PushInt(SetExact)
|
|
th.PushValue(hbrt.MakeBool(false))
|
|
th.PendingParams2(2)
|
|
SetFunc(th)
|
|
}
|
|
|
|
func TestGetSetting(t *testing.T) {
|
|
// Test helper functions
|
|
if GetSetExact() {
|
|
t.Error("GetSetExact should be false by default")
|
|
}
|
|
if GetSetDeleted() {
|
|
t.Error("GetSetDeleted should be false by default")
|
|
}
|
|
if GetSetSoftSeek() {
|
|
t.Error("GetSetSoftSeek should be false by default")
|
|
}
|
|
}
|