nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: immutable-js/immutable-js
Pull request #2030 (2024-10-27 19:13:26)

Fix List.VNode.removeAfter() bug
Hello!
I have added a failing test. I was not sure where to write it, let me know if it should be located elsewhere. I guess the bug comes from a bad copy/paste between VNode.removeBefore() & VNode.removeAfter().
Let me know if there is something missing in this PR.


Patch:
diff --git a/src/List.js b/src/List.js
index be698316d..26a946ece 100644
--- a/src/List.js
+++ b/src/List.js
@@ -271,7 +271,10 @@ class VNode {
   // TODO: seems like these methods are very similar
 
   removeBefore(ownerID, level, index) {
-    if (index === level ? 1 << level : 0 || this.array.length === 0) {
+    if (
+      (index & ((1 << (level + SHIFT)) - 1)) === 0 ||
+      this.array.length === 0
+    ) {
       return this;
     }
     const originIndex = (index >>> level) & MASK;
@@ -304,7 +307,10 @@ class VNode {
   }
 
   removeAfter(ownerID, level, index) {
-    if (index === (level ? 1 << level : 0) || this.array.length === 0) {
+    if (
+      index === (level ? 1 << (level + SHIFT) : SIZE) ||
+      this.array.length === 0
+    ) {
       return this;
     }
     const sizeIndex = ((index - 1) >>> level) & MASK;


Test patch:
diff --git a/__tests__/List.ts b/__tests__/List.ts
index 1fa808b80..9b40b99d3 100644
--- a/__tests__/List.ts
+++ b/__tests__/List.ts
@@ -722,6 +722,33 @@ describe('List', () => {
     expect(o.get(0)).toBe('f');
   });
 
+  it('works with push, set and insert without phantom values', () => {
+    const v = List.of().set(287, 287).push(42).insert(33, 33);
+    expect(v.toJS().filter(item => item === 287)).toHaveLength(1);
+    const v2 = List.of().push(0).unshift(-1).unshift(-2).pop().pop().set(2, 2);
+    expect(v2.toJS()).toEqual([-2, undefined, 2]);
+    const v3 = List.of().set(447, 447).push(0).insert(65, 65);
+    expect(v3.toJS().filter(item => item === 447)).toHaveLength(1);
+    const v4 = List.of().set(-28, -28).push(0).shift().set(-30, -30);
+    expect(v4.toJS().filter(item => item === -28)).toHaveLength(0);
+    const v5 = List.of().unshift(0).set(33, 33).shift().set(-35, -35);
+    expect(v5.toJS().filter(item => item === 0)).toHaveLength(0);
+
+    // execute the same test as `v` but for the 2000 first integers
+    const isOkV1 = v =>
+      List.of()
+        .set(v, v)
+        .push('pushed-value')
+        .insert(33, 'inserted-value')
+        .filter(item => item === v).size === 1;
+
+    const arr = new Array(2000).fill(null).map((_, v) => v);
+
+    const notOkArray = arr.filter(v => !isOkV1(v));
+
+    expect(notOkArray).toHaveLength(0);
+  });
+
   // TODO: assert that findIndex only calls the function as much as it needs to.
 
   it('forEach iterates in the correct order', () => {
Repository: skovhus/jest-codemods
Pull request #117 (2018-05-23 18:11:03)

Add support for jscodeshift's --ignore-pattern CLI option
Passing through `--ignore-pattern` CLI option to jscodeshift.


Patch:
diff --git a/src/cli/index.js b/src/cli/index.js
index 6acf6c3..787b2c5 100644
--- a/src/cli/index.js
+++ b/src/cli/index.js
@@ -18,15 +18,17 @@ const cli = meow(
     path    Files or directory to transform. Can be a glob like src/**.test.js
 
     Options
-      --force, -f   Bypass Git safety checks and forcibly run codemods
-      --dry, -d     Dry run (no changes are made to files)
-      --parser      The parser to use for parsing your source files (babel | babylon | flow)  [babel]
+      --ignore-pattern, -i  Ignore files that match a provided glob expression
+      --force, -f           Bypass Git safety checks and forcibly run codemods
+      --dry, -d             Dry run (no changes are made to files)
+      --parser              The parser to use for parsing your source files (babel | babylon | flow)  [babel]
     `,
     },
     {
         boolean: ['force', 'dry'],
         string: ['_'],
         alias: {
+            i: 'ignorePattern',
             f: 'force',
             h: 'help',
             d: 'dry',
diff --git a/src/cli/transformers.js b/src/cli/transformers.js
index 3449d94..3d94f57 100644
--- a/src/cli/transformers.js
+++ b/src/cli/transformers.js
@@ -8,9 +8,15 @@ function executeTransformation(files, flags, transformer, transformerArgs) {
     const transformerPath = path.join(transformerDirectory, `${transformer}.js`);
 
     let args = ['-t', transformerPath].concat(files);
+
     if (flags.dry) {
         args.push('--dry');
     }
+
+    if (flags.ignorePattern) {
+        args.push('--ignore-pattern', flags.ignorePattern);
+    }
+
     if (['babel', 'babylon', 'flow'].indexOf(flags.parser) >= 0) {
         args.push('--parser', flags.parser);
     }


Test patch:
diff --git a/src/cli/transformers.test.js b/src/cli/transformers.test.js
index 0173176..1162be7 100644
--- a/src/cli/transformers.test.js
+++ b/src/cli/transformers.test.js
@@ -36,12 +36,16 @@ it('runs jscodeshift for the given transformer', () => {
 it('supports jscodeshift flags', () => {
     execaReturnValue = { error: null };
     console.log = jest.fn();
-    executeTransformations('folder', { dry: true, parser: 'flow' }, ['ava']);
+    executeTransformations(
+        'folder',
+        { dry: true, ignorePattern: '/node_modules/', parser: 'flow' },
+        ['ava']
+    );
     expect(console.log).toBeCalledWith(
         `Executing command: jscodeshift -t ${path.join(
             transformerDirectory,
             'ava.js'
-        )} folder --dry --parser flow`
+        )} folder --dry --ignore-pattern /node_modules/ --parser flow`
     );
 });
Repository: skovhus/jest-codemods
Pull request #142 (2018-12-12 08:34:36)

Retain generator functions
Firstly, thanks heaps for making and maintaining these codemods! They have been super helpful to us while me migrate our legacy tests to Jest. 🙂

## Description

Our legacy Mocha tests use generator functions (async/await was barely an idea back then 😅) and the `jasmine-this.js` codemod, which is used in the `mocha.js` codemod, currently replaces all test callbacks with arrow functions. While this is almost always desirable behaviour, arrow functions have no generator equivalent. I added a small change to omit generator function nodes from the list of functions to convert and thought it might be useful to you. No worries if it isn't.


Patch:
diff --git a/src/transformers/jasmine-this.js b/src/transformers/jasmine-this.js
index 2763782..0d7d27b 100644
--- a/src/transformers/jasmine-this.js
+++ b/src/transformers/jasmine-this.js
@@ -200,6 +200,7 @@ export default function jasmineThis(fileInfo, api, options) {
             .filter(path =>
                 isFunctionExpressionWithinSpecificFunctions(path, allFunctionNames)
             )
+            .filter(path => !path.value.generator)
             .replaceWith(path => {
                 const newFn = j.arrowFunctionExpression(
                     path.value.params,


Test patch:
diff --git a/src/transformers/jasmine-this.test.js b/src/transformers/jasmine-this.test.js
index 2626adc..7c74260 100644
--- a/src/transformers/jasmine-this.test.js
+++ b/src/transformers/jasmine-this.test.js
@@ -51,6 +51,44 @@ describe('foo', () => {
 `
 );
 
+testChanged(
+    'does not transform generator functions',
+    `
+describe('foo', function*() {
+    beforeEach(function*() {
+        this.foo = { id: 'FOO' };
+        this.bar = { id: 'BAR', child: this.foo };
+    });
+
+    it('should have proper IDs', function*() {
+        expect(this.foo.id).to.equal('FOO');
+        expect(this.bar.id).to.equal('BAR');
+        expect(this.bar.child.id).to.equal('FOO');
+    });
+});
+`,
+    `
+describe('foo', function*() {
+    let testContext;
+
+    beforeEach(() => {
+        testContext = {};
+    });
+
+    beforeEach(function*() {
+        testContext.foo = { id: 'FOO' };
+        testContext.bar = { id: 'BAR', child: testContext.foo };
+    });
+
+    it('should have proper IDs', function*() {
+        expect(testContext.foo.id).to.equal('FOO');
+        expect(testContext.bar.id).to.equal('BAR');
+        expect(testContext.bar.child.id).to.equal('FOO');
+    });
+});
+`
+);
+
 testChanged(
     'transforms only test functions context',
     `
Repository: skovhus/jest-codemods
Pull request #143 (2018-12-12 11:25:40)

Reject "ok" when it isn't proceeded by "to"
Unfortunately we have some legacy tests that use both the `chai.assert` and `chai.expect` methods (don't ask 😔), which contain assertions similar to the following:

```javascript
const x = { ok: true }
assert.ok(x.ok)
expect(x.ok).to.be.ok
```

The `chai-assert.js` codemod works perfectly (🙌) but when the `chai-should.js` codemod is run, the results play out in one of the following ways...

**chai-assert run first**:

```javascript
// after chai-assert has been run
expect(x.ok).toBeTruthy()
expect(x.ok).to.be.ok

// after chai-should has been run
expect(x.toBeTruthy()).toBeTruthy()
expect(x.toBeTruthy()).toBeTruthy()
```

**chai-should run first**:

```javascript
// after chai-should has been run
assert.toBeTruthy()
expect(x.ok).toBeTruthy()
```

I added a reject (negated filter) condition to ensure only `ok` nodes preceded by `to` are converted. (I initially tried `ok` nodes proceeded by `be` but the `should.js` codemod failed the `should(true).ok` test as it imports the `chai-should.js` codemod). I thought this also might be useful to someone else but no worries if not. 🙂


Patch:
diff --git a/src/transformers/chai-should.js b/src/transformers/chai-should.js
index f76ffed..547489b 100644
--- a/src/transformers/chai-should.js
+++ b/src/transformers/chai-should.js
@@ -346,7 +346,14 @@ module.exports = function transformer(fileInfo, api, options) {
                         name: name => members.indexOf(name.toLowerCase()) !== -1,
                     },
                 })
-                .filter(p => findParentOfType(p, 'ExpressionStatement'));
+                .filter(p => findParentOfType(p, 'ExpressionStatement'))
+                .filter(p => {
+                    const { value } = p;
+                    const propertyName = value.property.name.toLowerCase();
+
+                    // Reject "ok" when it isn't  proceeded by "to"
+                    return !(propertyName === 'ok' && !chainContains('to', value, 'to'));
+                });
 
         getMembers().forEach(p => {
             if (p.parentPath.value.type === j.CallExpression.name) {


Test patch:
diff --git a/src/transformers/chai-should.test.js b/src/transformers/chai-should.test.js
index cf345c4..4980065 100644
--- a/src/transformers/chai-should.test.js
+++ b/src/transformers/chai-should.test.js
@@ -518,7 +518,12 @@ testChanged(
         expect(undefined).to.not.be.ok;
         expect(null).to.not.be.ok;
         expect(null).to.not.be.ok();
-    `,
+
+        const x = { ok: true };
+        assert.ok(x.ok);
+        expect(x.ok).toBeTruthy();
+        expect(x.ok).to.be.ok;
+        `,
     `
         expect('everything').toBeTruthy();
         expect(1).toBeTruthy();
@@ -526,7 +531,12 @@ testChanged(
         expect(undefined).toBeFalsy();
         expect(null).toBeFalsy();
         expect(null).toBeFalsy();
-    `
+
+        const x = { ok: true };
+        assert.ok(x.ok);
+        expect(x.ok).toBeTruthy();
+        expect(x.ok).toBeTruthy();
+        `
 );
 
 testChanged(
Repository: skovhus/jest-codemods
Pull request #154 (2019-02-22 23:12:04)

Always transform chai's `string` to `toContain`
I thought I'd take a shot at fixing #153. Here's what I did.


Patch:
diff --git a/src/transformers/chai-should.js b/src/transformers/chai-should.js
index 547489b..fbd11f1 100644
--- a/src/transformers/chai-should.js
+++ b/src/transformers/chai-should.js
@@ -518,6 +518,7 @@ module.exports = function transformer(fileInfo, api, options) {
                     case 'throw':
                         return createCall('toThrowError', args, rest, containsNot);
                     case 'string':
+                        return createCall('toContain', args, rest, containsNot);
                     case 'include':
                     case 'includes':
                     case 'contain':


Test patch:
diff --git a/src/transformers/chai-should.test.js b/src/transformers/chai-should.test.js
index 4980065..3a1c1dd 100644
--- a/src/transformers/chai-should.test.js
+++ b/src/transformers/chai-should.test.js
@@ -330,10 +330,14 @@ testChanged(
     `
         expect('foobar').to.have.string('bar');
         expect('foobar').not.to.have.string('z');
+        expect(someString).to.have.string('bar');
+        expect(someString).not.to.have.string('bar');
     `,
     `
         expect('foobar').toContain('bar');
         expect('foobar').not.toContain('z');
+        expect(someString).toContain('bar');
+        expect(someString).not.toContain('bar');
     `
 );
Repository: skovhus/jest-codemods
Pull request #170 (2019-06-27 12:20:52)

Add support for migrating jasmine.createSpyObj
Add support for migrating `jasmine.createSpyObj` to an object containing `jest.fn()`s


Patch:
diff --git a/src/transformers/jasmine-globals.js b/src/transformers/jasmine-globals.js
index 529e532..05fdf90 100644
--- a/src/transformers/jasmine-globals.js
+++ b/src/transformers/jasmine-globals.js
@@ -490,5 +490,37 @@ export default function jasmineGlobals(fileInfo, api, options) {
         });
     });
 
+    root.find(j.CallExpression, {
+        callee: {
+            type: 'MemberExpression',
+            object: {
+                type: 'Identifier',
+                name: 'jasmine',
+            },
+            property: {
+                type: 'Identifier',
+                name: 'createSpyObj',
+            },
+        },
+    })
+        .filter(
+            path =>
+                path.node.arguments.length === 2 &&
+                path.node.arguments[1].type === 'ArrayExpression'
+        )
+        .forEach(path => {
+            const properties = path.node.arguments[1].elements.map(arg =>
+                j.objectProperty(
+                    j.literal(arg.value),
+                    j.callExpression(
+                        j.memberExpression(j.identifier('jest'), j.identifier('fn')),
+                        []
+                    )
+                )
+            );
+
+            j(path).replaceWith(j.objectExpression(properties));
+        });
+
     return finale(fileInfo, j, root, options);
 }


Test patch:
diff --git a/src/transformers/jasmine-globals.test.js b/src/transformers/jasmine-globals.test.js
index e997402..ad9df1d 100644
--- a/src/transformers/jasmine-globals.test.js
+++ b/src/transformers/jasmine-globals.test.js
@@ -196,3 +196,17 @@ testChanged(
     expect.stringMatching('text');
     `
 );
+
+testChanged(
+    'createSpyObj',
+    `
+    const spyObj = jasmine.createSpyObj('label', ['a', 'b', 'hyphen-ated']);
+    `,
+    `
+    const spyObj = {
+        'a': jest.fn(),
+        'b': jest.fn(),
+        'hyphen-ated': jest.fn()
+    };
+    `
+);
Repository: skovhus/jest-codemods
Pull request #196 (2020-06-02 20:37:54)

Handle chai should .length special case
Closes https://github.com/skovhus/jest-codemods/issues/185


Patch:
diff --git a/src/transformers/chai-should.ts b/src/transformers/chai-should.ts
index 5ad83a5..c915684 100644
--- a/src/transformers/chai-should.ts
+++ b/src/transformers/chai-should.ts
@@ -451,6 +451,15 @@ export default function transformer(fileInfo, api, options) {
                   ) {
                     return createCallChain(['Object', 'keys'], [node])
                   }
+
+                  if (
+                    node.type === j.MemberExpression.name &&
+                    node.property.type === 'Identifier' &&
+                    node.property.name === 'length'
+                  ) {
+                    return node.object
+                  }
+
                   return node
                 }),
                 containsNot


Test patch:
diff --git a/src/transformers/chai-should.test.ts b/src/transformers/chai-should.test.ts
index 5b55229..0e30a83 100644
--- a/src/transformers/chai-should.test.ts
+++ b/src/transformers/chai-should.test.ts
@@ -301,13 +301,15 @@ testChanged(
         expect('').to.be.empty;
         expect(v).to.be.empty;
         expect({}).to.be.empty;
-    `,
+        expect(wrapper.find('.failure-message').length).to.be.empty;
+  `,
   `
         expect([]).toHaveLength(0);
         expect('').toHaveLength(0);
         expect(Object.keys(v)).toHaveLength(0);
         expect(Object.keys({})).toHaveLength(0);
-    `
+        expect(wrapper.find('.failure-message')).toHaveLength(0);
+  `
 )
 
 testChanged(
Repository: skovhus/jest-codemods
Pull request #228 (2021-08-13 15:01:33)

chai-should: convert before/after/context into their jest equivalents

skovhus: Thanks!

Patch:
diff --git a/src/transformers/chai-should.ts b/src/transformers/chai-should.ts
index c915684..017d150 100644
--- a/src/transformers/chai-should.ts
+++ b/src/transformers/chai-should.ts
@@ -112,6 +112,12 @@ const typeEqualityToConstructor = {
   uint8clampedarray: 'Uint8ClampedArray',
 }
 
+const chaiToJestGlobalMethods = {
+  before: 'beforeAll',
+  after: 'afterAll',
+  context: 'describe',
+}
+
 export const assertPrefixes = new Set(['to', 'with', 'that'])
 
 export default function transformer(fileInfo, api, options) {
@@ -676,10 +682,28 @@ export default function transformer(fileInfo, api, options) {
       })
       .size()
 
+  const updateGlobalCallExpressions = () =>
+    root
+      .find(j.CallExpression, {
+        callee: {
+          type: j.Identifier.name,
+          name: (name) => Object.keys(chaiToJestGlobalMethods).includes(name),
+        },
+      })
+      .replaceWith((p) => {
+        const { value } = p
+        return j.callExpression(
+          j.identifier(chaiToJestGlobalMethods[value.callee.name]),
+          value.arguments
+        )
+      })
+      .size()
+
   mutations += shouldChainedToExpect()
   mutations += shouldIdentifierToExpect()
   mutations += updateCallExpressions()
   mutations += updateMemberExpressions()
+  mutations += updateGlobalCallExpressions()
 
   root
     .find(j.MemberExpression, {


Test patch:
diff --git a/src/transformers/chai-should.test.ts b/src/transformers/chai-should.test.ts
index fd97d7d..cd6da6b 100644
--- a/src/transformers/chai-should.test.ts
+++ b/src/transformers/chai-should.test.ts
@@ -869,5 +869,44 @@ it('leaves code without should/expect', () => {
   expect(result).toBeNull()
 })
 
+it('converts before, after and context to beforeAll, afterAll and describe', () => {
+  expectTransformation(
+    `
+        before(() => {
+          doSetup();
+        });
+
+        after(() => {
+          doTeardown();
+        });
+
+        describe('functionUnderTest', () => {
+          context('when something is the case', () => {
+            it('should behave', () => {
+              expect(false).to.be.false;
+            });
+          });
+        });
+    `,
+    `
+        beforeAll(() => {
+          doSetup();
+        });
+
+        afterAll(() => {
+          doTeardown();
+        });
+
+        describe('functionUnderTest', () => {
+          describe('when something is the case', () => {
+            it('should behave', () => {
+              expect(false).toBe(false);
+            });
+          });
+        });
+    `
+  )
+})
+
 // TODO: warn about chaining not working
 // E.g. expect({ foo: 'baz' }).to.have.property('foo').and.not.equal('bar');
Repository: skovhus/jest-codemods
Pull request #231 (2021-09-27 19:13:02)

tape: add rejects
sample

```diff
-  t.rejects(
-    someFunction('some arg'),
-    new Error('foo'),
-    'Error is thrown',
-  );
+  expect(someFunction('some arg')).rejects.toStrictEqual(new Error('foo'));
```


Patch:
diff --git a/src/transformers/tape.ts b/src/transformers/tape.ts
index 6626469..1224d20 100644
--- a/src/transformers/tape.ts
+++ b/src/transformers/tape.ts
@@ -12,6 +12,7 @@ import {
 } from '../utils/tape-ava-helpers'
 
 const SPECIAL_THROWS_CASE = '(special throws case)'
+const SPECIAL_REJECTS_CASE = '(special rejects case)'
 const SPECIAL_PLAN_CASE = '(special plan case)'
 
 const SUPPORTED_TEST_METHODS = ['test.skip', 'test.todo']
@@ -62,6 +63,7 @@ const tPropertiesMap = {
   isInequivalent: 'not.toEqual',
 
   throws: SPECIAL_THROWS_CASE,
+  rejects: SPECIAL_REJECTS_CASE,
   doesNotThrow: SPECIAL_THROWS_CASE,
   plan: SPECIAL_PLAN_CASE,
 }
@@ -179,6 +181,10 @@ export default function tapeToJest(fileInfo, api, options) {
                 [args[1]]
               )
             }
+          } else if (newPropertyName == SPECIAL_REJECTS_CASE) {
+            newCondition = j.callExpression(j.identifier('rejects.toStrictEqual'), [
+              args[1],
+            ])
           } else if (newPropertyName === SPECIAL_PLAN_CASE) {
             const condition = j.memberExpression(
               j.identifier('expect'),


Test patch:
diff --git a/src/transformers/tape.test.ts b/src/transformers/tape.test.ts
index 1e483f0..ced0ad4 100644
--- a/src/transformers/tape.test.ts
+++ b/src/transformers/tape.test.ts
@@ -350,6 +350,24 @@ test(() => {
   )
 })
 
+test('t.rejects', () => {
+  expectTransformation(
+    `
+import test from 'tape';
+test(t => {
+    t.rejects(myfunc, myerror);
+    t.rejects(myfunc, myerror, 'should throw');
+});
+`,
+    `
+test(() => {
+    expect(myfunc).rejects.toStrictEqual(myerror);
+    expect(myfunc).rejects.toStrictEqual(myerror);
+});
+`
+  )
+})
+
 test('destructured test argument', () => {
   expectTransformation(
     `
Repository: Peternator7/strum
Pull request #18 (2018-04-07 09:33:53)

Implement Clone trait for enum iterators.
I implemented the `Clone` trait for enum iterators, this enables [`cycle()`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.cycle). I have added tests for both `clone()` and `cycle()`.

Peternator7: Hey @mthiesen,

Sorry for the delay on getting to this; This looks good to me. I'll merge and then push and update to crates.io sometime this week.

Thanks!!

Patch:
diff --git a/strum_macros/src/enum_iter.rs b/strum_macros/src/enum_iter.rs
index 3fc6db5..1e4fd7c 100644
--- a/strum_macros/src/enum_iter.rs
+++ b/strum_macros/src/enum_iter.rs
@@ -108,5 +108,14 @@ pub fn enum_iter_inner(ast: &syn::DeriveInput) -> quote::Tokens {
                 self.size_hint().0
             }
         }
+
+        impl #impl_generics Clone for #iter_name #ty_generics #where_clause {
+            fn clone(&self) -> #iter_name #ty_generics {
+                #iter_name {
+                    idx: self.idx,
+                    marker: self.marker.clone(),
+                }
+            }
+        }
     }
 }


Test patch:
diff --git a/strum_tests/tests/enum_iter.rs b/strum_tests/tests/enum_iter.rs
index 63df578..bd66b3b 100644
--- a/strum_tests/tests/enum_iter.rs
+++ b/strum_tests/tests/enum_iter.rs
@@ -60,3 +60,37 @@ fn len_test() {
 
     assert_eq!(0, i.len());
 }
+
+#[test]
+fn clone_test() {
+    let mut i = Week::iter();
+    i.next();
+    i.next();
+
+    let mut i_cloned = i.clone();
+
+    assert_eq!(Some(Week::Tuesday), i.next());
+    assert_eq!(Some(Week::Tuesday), i_cloned.next());
+
+    i.next();
+    i.next();
+
+    assert_eq!(Some(Week::Friday), i.next());
+    assert_eq!(Some(Week::Wednesday), i_cloned.next());
+}
+
+#[test]
+fn cycle_test() {
+    let results = Week::iter().cycle().take(10).collect::<Vec<_>>();
+    let expected = vec![Week::Sunday,
+                        Week::Monday,
+                        Week::Tuesday,
+                        Week::Wednesday,
+                        Week::Thursday,
+                        Week::Friday,
+                        Week::Saturday,
+                        Week::Sunday,
+                        Week::Monday,
+                        Week::Tuesday];
+    assert_eq!(expected, results);
+}