#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
#define int long long
char str[maxn];
int dp[maxn],n,cost[2],c;
signed main()
{
signed T; scanf("%d",&T);
while(T--)
{
scanf("%lld%lld%lld%lld",&n,&cost[0],&cost[1],&c);
scanf("%s",str+1);
for(int i=1;i<=n;++i)
dp[i] = dp[i-1] + min(cost[str[i] - '0'],c + cost[!(str[i] - '0')]);
cout << dp[n] << endl;
}
return 0;
}