luv

Workshop wiki

surveyor-tests.lisp

mcclim/surveyor-tests.lisp

system luvcraft/mcclim/test · 14 definitions · on GitHub

defpackage#:mcluv.surveyor-tests
:use#:cl#:rove
in-package#:mcluv.surveyor-tests
defclassdirect-overlay-preparation-probe
observations:initformnil:accessordirect-overlay-preparation-observations
defmethodmcluv::prepare-mirror-compositor-target-revision
revision&keytarget-formatdepth-stencil
declare
ignoremirror
push
listrevisiontarget-formatdepth-stencil
direct-overlay-preparation-observationsoverlay
defteststatic-luvcraft-world-overlay-prepares-its-hdr-panel-target
let*
mirror
make-instance'mcluv:luv-gpu-mirror:sheetnil:targetnil:contextnil
overlay
make-instance'direct-overlay-preparation-probe:sessionnil:framenil:mirrormirror
expected
list
listrevision:rgba16-float'
:format:depth32-float:depth-write-enabledt:depth-compare:always

Seed the static semantic revision while no compositor is attached.

setf
mcluv:mirror-compositormirror
overlay

Repaint publication and static refresh must agree on the actual panel attachment; otherwise each semantic edit would discard the cohort that the pre-pass boundary had just installed.

ok
equalexpected
direct-overlay-preparation-observationsoverlay
setf
direct-overlay-preparation-observationsoverlay
nil
ok
equalexpected
direct-overlay-preparation-observationsoverlay
deftestsurveyor-captures-one-dense-terrain-product
let*
camera
make-instance'luvcraft:fly-camera:position
session
make-instance'luvcraft:luvcraft-session:worldworld:playerplayer
snapshot
ok
=48
length
mcluv::surveyor-snapshot-heightssnapshot
ok
=48
length
mcluv::surveyor-snapshot-materialssnapshot
ok
=48
length
mcluv::surveyor-snapshot-lightssnapshot
ok
=12
mcluv::surveyor-snapshot-center-xsnapshot
ok
=34
mcluv::surveyor-snapshot-center-zsnapshot
ok
<=
mcluv::surveyor-snapshot-minimum-heightsnapshot
mcluv::surveyor-snapshot-maximum-heightsnapshot
ok
every
lambda
material
typepmaterial'luvcraft:block-kind
coerce
mcluv::surveyor-snapshot-materialssnapshot
'list
deftestunavailable-world-light-is-explicit
let
multiple-value-bind
skyblockstate
ok
zeropsky
ok
zeropblock
ok
eqstate:unavailable
deftestmcclim-commands-replay-in-each-overlays-final-pass
ok
let
overlay
allocate-instance
dolist
command
list
mcluv::make-gpu-solid-command
mcluv::make-gpu-analytic-command
mcluv::make-gpu-relief-analytic-command
mcluv::make-gpu-gradient-analytic-command
mcluv::make-gpu-prepared-image-command
mcluv::make-gpu-prepared-lattice-command
mcluv::make-gpu-prepared-text-command
let
generic
context
mcluv::make-direct-widget-command-encode-context
dolist
command
list
mcluv::make-gpu-solid-command
mcluv::make-gpu-analytic-command
mcluv::make-gpu-relief-analytic-command
mcluv::make-gpu-gradient-analytic-command
mcluv::make-gpu-prepared-image-command
mcluv::make-gpu-prepared-lattice-command
mcluv::make-gpu-prepared-text-command
ok
compute-applicable-methodsgeneric
listcommandnilcontext
ok
equal'
:format:depth32-float:depth-write-enabledt:depth-compare:always
deftestworld-panels-target-the-native-density-hdr-attachment
let*
target
gensym"WORLD-PANEL-COLOR"
renderer
make-instance'luvcraft::luvcraft-renderer:frame-attachments
list:world-panel-color-texturetarget
session
make-instance'luvcraft:luvcraft-session:rendererrenderer
overlay
make-instance'mcluv:luvcraft-world-widget-overlay:sessionsession:framenil:mirrornil
ok
eqtarget
deftestwidget-focus-probes-the-logical-retina-center
let*
canvas
make-instance'luv:sdl-canvas:width1000:height500
session
make-instance'luvcraft:luvcraft-session:canvascanvas
overlay
make-instance'mcluv:luvcraft-world-widget-overlay:sessionsession:framenil:mirrornil
setf
mcluv:widget-overlay-render-stateoverlay
make-array16:element-type'single-float:initial-contents'
0.00.00.01.01.00.00.00.00.01.00.00.00.00.00.00.0
let
coordinate
okcoordinate
ok
=0.5
firstcoordinate
ok
=0.5
secondcoordinate

This has no canvas context or drawable extent on purpose. Focus uses the same logical point space as SDL pointer events, not GPU pixels.

deftestterminal-film-browser-shows-directories-and-playable-files
let*
root
asdf:system-source-directory:luv
directory
merge-pathnames"libav/"root
ok
mcluv::terminal-film-pathname-p
merge-pathnames"test-pattern.mp4"directory
ok
not
mcluv::terminal-film-pathname-p
merge-pathnames"README.org"directory
ok
find"test-pattern.mp4"entries:test#'string=:key
lambda
entry
and
eq:film
mcluv::terminal-film-entry-kindentry
file-namestring
mcluv::terminal-film-entry-pathnameentry
deftestterminal-film-browser-shortens-long-directory-headings
let
label
mcluv::terminal-film-browser-path-label#P"/a/directory/name/that/is/long/enough/to/collide/with/the/browser/title/"
ok
string="..."label:end23