program bbutilsbeta_tests;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Classes, bbutilsbeta
  { you can add units after this };

type TStringEnumerator = specialize TCommonEnumerator<string>;

  type TStringListX = class(TStringList) end;


var sl: TStringListX;
  s: string;
begin
  sl := TStringListX.Create;
  for s in TStringEnumerator.create(sl.Count, @sl.Get) do
    writeln(s);
  writeln('-----------');

  sl.add('a');
  for s in TStringEnumerator.create(sl.Count, @sl.Get) do
    writeln(s);
  writeln('-----------');

  sl.add('b');
  for s in TStringEnumerator.create(sl.Count, @sl.Get) do writeln(s);
  writeln('-----------');

  sl.add('c');
  for s in TStringEnumerator.create(sl.Count, @sl.Get) do writeln(s);
  writeln('-----------');

end.

