#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, a, b;
  cin >> n >> a >> b;
  scanf("\n");
  vector<long long> road(n);
  long long ones = 0;
  long long firstOne = -1;
  for (long long i = 0; i < n; i++) {
    char c;
    scanf("%c", &c);
    road[i] = (long long)(c - '0');
    if (firstOne == -1 && road[i] == 1) firstOne = i;
    if (road[i] == 1) ones++;
  }
  long long lastOne = -1;
  for (long long i = n - 1; i > 0; i--) {
    if (road[i] == 1) {
      lastOne = i;
      break;
    }
  }
  if (firstOne == -1) {
    cout << n * a + (n + 1) * b << endl;
    return;
  }
  if (firstOne == lastOne) {
    cout << (n + 2) * a + (n + 3) * b << endl;
    return;
  }
  vector<long long> sizes;
  long long currSize = -1;
  long long totalSize = 0;
  for (long long i = firstOne; i < lastOne; i++) {
    if (road[i] == 0 && road[i + 1] == 1) {
      sizes.push_back(currSize);
      totalSize += currSize;
      currSize = -1;
    } else if (road[i] == 0 && road[i + 1] == 0)
      currSize++;
    else if (road[i] == 1 && road[i + 1] == 0)
      currSize = 1;
  }
  long long totalCost = 0;
  long long remLn = n - (lastOne - firstOne + 1);
  totalCost = remLn * b + (remLn - 2) * a + 4 * (a + b);
  vector<long long>::iterator it;
  for (it = sizes.begin(); it < sizes.end(); it++) {
    long long size = *it;
    if (size == 1)
      totalCost += a;
    else {
      if (2 * a < (size - 1) * b)
        totalCost += ((size + 2) * a + (size - 1) * b);
      else
        totalCost += ((size - 1) * 2 * b + size * a);
    }
  };
  long long breaks = sizes.size();
  long long oneCost = ones * a + (ones + breaks - 1) * 2 * b;
  cout << totalCost + oneCost << endl;
}
int main() {
  long long T;
  cin >> T;
  for (long long t = 0; t < T; t++) solve();
  return 0;
}
