# /usr/bin/python3
# Test program for module {paper_figures_B}
# Last edited on 2022-04-14 14:55:26 by stolfi

import paper_figures_B
import paper_example_B
import move
import move_parms
import path
import contact
import txt_write
import job_parms
import hacks
import pyx
import rn
import sys
from math import sqrt, sin, cos, floor, ceil, inf, nan, pi

# Figures and number of sub-figures:

def test_plot_figure():
  sys.stderr.write("--- testing {make}---\n")

  fignums = (
    
    ( "cover", "basic" ),
    ( "paths", "basic"),
    ( "moves", "dir"),
    ( "moves", "rev"),
    ( "input", "rasct"),
    ( "input", "links"),
    ( "input", "graph"),
    ( "zigzag", "nonalt"),
    ( "zigzag", "alt"),
    ( "hotfill", "sol50000m50"),
    ( "hotfill", "sol50000m05"),
    ( "hotfill", "sta03500m05"),
    ( "hotfill", "sol03500m05"),
    ( "hotfill", "sol02300m05"),
    ( "hotfill", "sol01700m05"),
    ( "hotfill", "tab03500m05"),
    ( "comb10", "zigzig"),
    ( "comb10", "zigzag"),
    ( "comb10", "optfab"),
    ( "comb10", "optzig"),
    ( "comb10", "optzag"),

    ( "comb11", "zigzig"),
    ( "comb11", "zigzag"),
    ( "comb11", "optfab"),
    ( "comb11", "optzig"),
    ( "comb11", "optzag"),

    ( "comb12", "zigzig"),
    ( "comb12", "zigzag"),
    ( "comb12", "optfab"),
    ( "comb12", "optzig"),
    ( "comb12", "optzag"),

    ( "cold", "path"),

    ### NO ( "blocks", "genblocks"),
    ### NO ( "blocks", "genchoices"),
    ### NO ( "blocks", "gengraph"),
    ### NO ( "blocks", "ctrblocks"),
    ### NO ( "blocks", "ctrchoices"),
    ### NO ( "rivers", "whole"),
    ### NO ( "rivers", "subs"),
  )
  
  for fig, subfig in fignums:
    sys.stderr.write("--- testing {plot_figure} fig = '%s' = subfig %s---\n" % (fig,subfig))
    name = "tests/out/paper_figures_B_TST_p_" + fig + "_" + subfig
    paper_figures_B.plot_figure(name, fig, subfig)
  return
  # ----------------------------------------------------------------------

test_plot_figure()
