You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: test_conv.m
    path of file: ./repos/chebfun/tests/chebfun
    
    the code of the file until where you have to start completion: % Test file for @chebfun/conv.m.

function pass = test_conv(pref)

% Grab some preferences
if ( nargin == 0 )
    pref = chebfunpref();
end

% Construct a few CHEBFUN objects for the tests.
f = chebf
    
function convolution
% Delta funciton reproduces the function under convolution:
f = chebfun({@(x) sin(x), @(x) cos(x), @(x) sin(4*x.^2)}, [-2, -1, 0, 1] );
x = chebfun('x', [-2, 1] );
d = dirac(x);
g = conv(d, f);
g = restrict(g, [-2, 1]);
g.pointValues(1) = 2*g.pointValues(1);
g.pointValues(end