Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea7d06a commit c365e82Copy full SHA for c365e82
1 file changed
String/test/BoyerMoore.test.js
@@ -0,0 +1,15 @@
1
+import { boyerMoore } from '../BoyerMoore'
2
+
3
+describe('Testing the boyer moore algorithm', () => {
4
+ it('Testing with alphabetical strings', () => {
5
+ expect(boyerMoore('THIS IS A TEST TEXT', 'TEST')).toBe(10)
6
+ expect(boyerMoore('AAIOOOAADDZXYCAADAABAABA', 'AADA')).toBe(14)
7
+ expect(boyerMoore('Hello World! This is a test case.', 'Boyer')).toBe(-1)
8
+ })
9
10
+ it('Testing with alphabets and symbols', () => {
11
+ expect(boyerMoore('AA&&@_OPOODDA##!', '@_')).toBe(4)
12
+ expect(boyerMoore('LK_||{{}}[[$($', '||')).toBe(3)
13
+ expect(boyerMoore('__||{{__+}}[[$($', '-}}')).toBe(-1)
14
15
+})
0 commit comments