summaryrefslogtreecommitdiff
path: root/pbt/ts/src/index.test.ts
blob: 7c4fd61bc261239ce12312bc642cfbc5048dbb76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import {
  prop_reverse_is_self_inverse,
  prop_reverse_with_two_lists,
} from './index.js';
import {Property, classify} from './property.js';

describe('testing lists reversal', () => {
  test('reverse of two appended lists is append of each list reversed', async () => {
    const reverse_append_result = await Property.run(
      prop_reverse_with_two_lists,
    );
    console.log(reverse_append_result);
    console.log(reverse_append_result.counterexample);
    expect(reverse_append_result.result).toBe('OK');
  });

  test('reverse is self-inverse', async () => {
    const result = await Property.run(prop_reverse_is_self_inverse);
    console.log(classify(result));
    expect(result.result).toBe('OK');
  });
});